Skip to content

Commit

Permalink
Upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
neongreen committed Aug 6, 2023
1 parent 9271647 commit e5dd59a
Show file tree
Hide file tree
Showing 7 changed files with 3,956 additions and 2,411 deletions.
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ npm run dev
npm run tauri dev
```


Building the prod app:

```bash
Expand Down Expand Up @@ -134,11 +133,17 @@ Do an interactive upgrade:
npx npm-upgrade
```

Read changelogs for major version upgrades — some things are not going to be caught by TypeScript, eg. the `command -> meta` change in react-hotkeys-hook.
Rules:

* Read changelogs for major version upgrades — some things are not going to be caught by TypeScript, eg. the `command -> meta` change in react-hotkeys-hook.

* Don't upgrade ProseMirror stuff or @types/node.

Don't upgrade ProseMirror stuff or @types/node.
Run `npm i`. Run `npm run check`. NOTE THAT THIS PROJECT DOES NOT USE YARN.

Run `npm i`. Run `npm run check`.
Troubleshooting:

* "peer dependencies" with typescript-eslint: `rm -rf package-lock.json node_modules/`

## Upgrading Tiptap

Expand All @@ -150,35 +155,44 @@ git fetch --all
Note the commits in our fork:

```bash
git log --oneline
git log --oneline | grep WOC:
```

Kill our commits with `git reset ... --hard`. (For example, smth like the unused-packages commit is hard to rebase. The `@ts-nocheck` commit has to be repeated every time anyway.)
Kill our commits with `git reset <commit before our changes> --hard`. (For example, smth like the unused-packages commit is hard to rebase. The `@ts-nocheck` commit has to be repeated every time anyway.)

Get upstream changes:

```bash
git rebase upstream/main
```

Copy all dependencies from `tiptap/packages/pm/package.json` into our `package.json`, and run `npm i`.
Copy all dependencies from `tiptap/packages/pm/package.json` into our `package.json`, and run `npm i` in the root.

Remove git hooks:

```bash
rm -rf .husky
git add .
git commit -m "WOC: Remove git hooks"
```

Add `@ts-nocheck`:

```bash
# Add @ts-nocheck
(cd ..; npm run tiptap-nocheck)
git add .
git commit -m "WOC: Add @ts-nocheck"
```

`git cherry-pick` our commits back.

Check that things build: `npm run build`. Do `npm run dev` and check that the editor works.
At the root, check that things build: `npm run build`. Do `npm run dev` and check that the editor works.

NOTE: `rm -rf tiptap/node_modules` if you get weird errors.

```bash
# Commit and update the submodule
Commit and update the submodule:

```bash
git push origin HEAD:main --force
(cd ..; git submodule update --remote tiptap)
```
Loading

0 comments on commit e5dd59a

Please sign in to comment.