bump mocha to 9.x and ensure lockfiles aren't created #6

Closed
jgravois wants to merge 2 commits from deps into master
jgravois commented 2021-10-14 04:31:37 +02:00 (Migrated from github.com)

i'm working on tracking down an error in prosemirror-collab and in the interim i noticed that a few more dependencies are needed to ensure a clean npm i && npm test.

  • add prosemirror-schema-basic
  • add prosemirror-schema-list
  • bump mocha to 9.x to resolve a possible security vulnerability
  • ensure that a package-lock.json file isn't created on npm install since you don't check them into version control.

happy to walk any of the individual items above back if they aren't desired. thanks for all your work on this project! 🥇

i'm working on tracking down an error in prosemirror-collab and in the interim i noticed that a few more dependencies are needed to ensure a clean `npm i && npm test`. * add `prosemirror-schema-basic` * add `prosemirror-schema-list` * bump mocha to 9.x to resolve a possible security vulnerability * ensure that a package-lock.json file isn't created on `npm install` since you don't check them into version control. happy to walk any of the individual items above back if they aren't desired. thanks for all your work on this project! 🥇
marijnh commented 2021-10-14 08:56:54 +02:00 (Migrated from github.com)

How does this package use schema-basic/schema-list?

How does this package use schema-basic/schema-list?
jgravois commented 2021-10-14 18:32:01 +02:00 (Migrated from github.com)

apparently via prosemirror-test-builder.

github.com/ProseMirror/prosemirror-test-builder@6b191acb3d/package.json (L19-L23)

mac~/code/prosemirror-collab[deps L|✚1] % npm --version
6.14.11

mac~/code/prosemirror-collab[deps L|✚1] % npm test

> prosemirror-collab@1.2.2 test /Users/john/code/prosemirror-collab
> mocha test/test-*.js


Error: Cannot find module 'prosemirror-schema-list'
Require stack:
- /Users/john/code/prosemirror-collab/node_modules/prosemirror-test-builder/dist/index.js
apparently via `prosemirror-test-builder`. https://github.com/ProseMirror/prosemirror-test-builder/blob/6b191acb3d82d0947f18ea0a67acc04d33bd996a/package.json#L19-L23 ```bash mac~/code/prosemirror-collab[deps L|✚1] % npm --version 6.14.11 mac~/code/prosemirror-collab[deps L|✚1] % npm test > prosemirror-collab@1.2.2 test /Users/john/code/prosemirror-collab > mocha test/test-*.js Error: Cannot find module 'prosemirror-schema-list' Require stack: - /Users/john/code/prosemirror-collab/node_modules/prosemirror-test-builder/dist/index.js ```
marijnh commented 2021-10-14 18:35:36 +02:00 (Migrated from github.com)

apparently via prosemirror-test-builder.

Which depends on these packages, so it doesn't seem necessary to make this one also depend on them.

> apparently via prosemirror-test-builder. Which depends on these packages, so it doesn't seem necessary to make this one also depend on them.
jgravois commented 2021-10-14 18:41:28 +02:00 (Migrated from github.com)

i could be missing something, but prior to npm@7, peerDependencies for a package are not installed by default.

https://docs.npmjs.com/cli/v7/configuring-npm/package-json#peerdependencies

i could be missing something, but prior to npm@7, peerDependencies for a package are _not_ installed by default. https://docs.npmjs.com/cli/v7/configuring-npm/package-json#peerdependencies
marijnh commented 2021-10-14 22:57:52 +02:00 (Migrated from github.com)

Oh, indeed, they are peer dependencies, weirdly—since none of the other packages work this way. More worryingly, that was the last patch to the test-builder repository, made last April, and I don't have any recollection of why I made it. I'm going to revert it, for the sake of consistency.

Oh, indeed, they are peer dependencies, weirdly—since none of the other packages work this way. More worryingly, that was the last patch to the test-builder repository, made last April, and I don't have any recollection of why I made it. I'm going to revert it, for the sake of consistency.
jgravois commented 2021-10-14 23:12:11 +02:00 (Migrated from github.com)

i confirmed locally that 1.0.5 does the trick!

i've pushed up another commit that reverts those additions just in case there's anything else in this PR that looks useful.

i confirmed locally that 1.0.5 does the trick! i've pushed up another commit that reverts those additions just in case there's anything else in this PR that looks useful.
marijnh commented 2021-10-15 09:30:27 +02:00 (Migrated from github.com)

I've applied your other changes for all packages (see d90d060cdf and bfa5940a9b in this repository).

I've applied your other changes for all packages (see d90d060cdf92e13012911bc3d2b2a71d54dab5fd and bfa5940a9b4621df5ff40092598c956ba0c30a7d in this repository).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-collab!6
No description provided.