Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use npm workspaces #822

Merged
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
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
- uses: dcodeIO/setup-node-nvm@master
with:
node-version: ${{matrix.node}}
- run: npm install -g npm
- run: npm install
- run: npm test
- uses: codecov/codecov-action@v1
Expand Down
3 changes: 0 additions & 3 deletions lerna.json

This file was deleted.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"c8": "^7.0.0",
"camelcase": "^6.0.0",
"execa": "^5.0.0",
"lerna": "^4.0.0",
"mdast-util-assert": "^4.0.0",
"mdast-util-gfm": "^1.0.0",
"micromark-extension-gfm": "^1.0.0",
Expand All @@ -30,11 +29,16 @@
"unist-util-remove-position": "^4.0.0",
"xo": "^0.44.0"
},
"workspaces": [
"packages/remark-parse",
"packages/remark-stringify",
"packages/remark",
"packages/remark-cli"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh so this fixes order?!
So that’s it! I had similar problems before: https://twitter.com/wooorm/status/1416491869488492546. PR to fix it linked from there: npm/arborist#303

],
Comment on lines +32 to +37
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build order matters here, when specified as packages/* it goes out of order https://github.com/remarkjs/remark/runs/3433219485?check_suite_focus=true#step:6:16

"scripts": {
"postinstall": "lerna bootstrap --no-ci",
"build": "lerna run build && rimraf \"*.d.ts\" \"{test,script}/**/*.d.ts\" && tsc && type-coverage",
"build": "npm run build --workspaces && rimraf \"*.d.ts\" \"{test,script}/**/*.d.ts\" && tsc && type-coverage",
"format": "./packages/remark-cli/cli.js . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api": "lerna run test && node --conditions development test/index.js",
"test-api": "npm run test --workspaces && node --conditions development test/index.js",
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
Expand Down