Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .changeset/brave-bugs-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@draft-js-plugins/alignment': patch
'@draft-js-plugins/anchor': patch
'@draft-js-plugins/counter': patch
'@draft-js-plugins/divider': patch
'@draft-js-plugins/drag-n-drop': patch
'@draft-js-plugins/drag-n-drop-upload': patch
'@draft-js-plugins/emoji': patch
'@draft-js-plugins/focus': patch
'@draft-js-plugins/hashtag': patch
'@draft-js-plugins/image': patch
'@draft-js-plugins/inline-toolbar': patch
'@draft-js-plugins/linkify': patch
'@draft-js-plugins/mention': patch
'@draft-js-plugins/resizeable': patch
'@draft-js-plugins/side-toolbar': patch
'@draft-js-plugins/static-toolbar': patch
'@draft-js-plugins/sticker': patch
'@draft-js-plugins/text-alignment': patch
'@draft-js-plugins/undo': patch
'@draft-js-plugins/video': patch
---

Use `@vectorworks/draft-js-plugins` for editor types and add it as a peer dependency.
5 changes: 5 additions & 0 deletions .changeset/silent-snails-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vectorworks/draft-js-plugins': patch
---

Upgrade Immutable.js to version 5.1.5 or later.
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

158 changes: 0 additions & 158 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ All necessary environmental info that will help triage this
Especially include:
-->

- @draft-js-plugins/editor version:
- @vectorworks/draft-js-plugins version:
- plugin name and version:

## Description
Expand Down
5 changes: 0 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ updates:
versions:
- 8.0.0
- 8.3.0
- dependency-name: '@storybook/react'
versions:
- 6.2.2
- 6.2.9
- dependency-name: next
versions:
- 10.1.1
Expand All @@ -35,7 +31,6 @@ updates:
- 4.14.2
- dependency-name: 'animateplus'
- dependency-name: 'immutable'
- dependency-name: 'linaria'
- package-ecosystem: github-actions
directory: '/'
schedule:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deployWebsite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16.x
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 24.x

- name: Install Dependencies
run: yarn
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches:
- master

permissions:
contents: write
packages: write
pull-requests: write

jobs:
release:
name: Release
Expand All @@ -17,10 +22,12 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16.x
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 24.x
registry-url: https://npm.pkg.github.com
scope: '@vectorworks'

- name: Install Dependencies
run: yarn
Expand All @@ -34,4 +41,5 @@ jobs:
title: 'Upcoming Release Changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [24.x]

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@vectorworks:registry=https://npm.pkg.github.com/Vectorworks
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
24
5 changes: 1 addition & 4 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
module.exports = {
core: {
builder: 'webpack5',
},
stories: ['../stories/**/*.stories.@(js|jsx|ts|tsx)'],
framework: '@storybook/react',
framework: '@storybook/react-webpack5',
staticDirs: ['../stories/public'],
};
19 changes: 13 additions & 6 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');

const packages = [
'@draft-js-plugins/editor',
['@vectorworks/draft-js-plugins', 'editor'],
'@draft-js-plugins/hashtag',
'@draft-js-plugins/linkify',
'@draft-js-plugins/anchor',
Expand All @@ -27,8 +27,10 @@ const packages = [
];

const packagesAliases = {};
packages.forEach((name) => {
const [, folderName] = name.split('/');
packages.forEach((packageDetails) => {
const [name, folderName] = Array.isArray(packageDetails)
? packageDetails
: [packageDetails, packageDetails.split('/')[1]];
packagesAliases[name] = path.join(
__dirname,
'../packages',
Expand Down Expand Up @@ -62,11 +64,16 @@ module.exports = async ({ config }) => {
},

{
test: /\.(js|jsx|ts|tsx)?$/,
test: /\.(js|jsx|ts|tsx)$/,
exclude: /node_modules/,
use: [{ loader: 'babel-loader' }],
},
{
test: /\.(js|jsx|ts|tsx)$/,
include: path.resolve(__dirname, '../packages'),
use: [
{ loader: 'babel-loader' },
{
loader: 'linaria/loader',
loader: '@wyw-in-js/webpack-loader',
options: {
sourceMap: true,
},
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Because of the structure of this repository you can not just use your own fork o

2. Install Yarn `npm install --global yarn` and install node modules `yarn install`

3. Reference the needed sub packages in your code f.ex. the plugin editor `import PluginEditor from '@draft-js-plugins/editor';`
3. Reference the needed sub packages in your code f.ex. the plugin editor `import PluginEditor from '@vectorworks/draft-js-plugins';`

4. When using Webpack you need to tell it how to compile the draft-js-plugins code, you do that by adding an additional loader like this:

Expand Down Expand Up @@ -91,7 +91,7 @@ module: {
```
resolve: {
alias: {
'@draft-js-plugins/editor': path.join(__dirname, 'node_modules', 'draft-js-plugins', 'packages', 'plugins-editor', 'src'),
'@vectorworks/draft-js-plugins': path.join(__dirname, 'node_modules', 'draft-js-plugins', 'packages', 'plugins-editor', 'src'),
'@draft-js-plugins/hashtag': path.join(__dirname, 'node_modules', 'draft-js-plugins', 'packages', 'hashtag', 'src'),
'@draft-js-plugins/linkify': path.join(__dirname, 'node_modules', 'draft-js-plugins', 'packages', 'linkify', 'src'),
'@draft-js-plugins/mention': path.join(__dirname, 'node_modules', 'draft-js-plugins', 'packages', 'mention', 'src'),
Expand Down
Loading
Loading