-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): fix release/prune which runs before make install (#3412)
Follow up of #3410 --- Turns out `npm query` requires your `node_modules` to be present, I've no idea why 🤷 , and we have a target that we sometimes run that needs to run before a `make install` (`make release/prune`) 🤦 . I saw that you can add a `npm --package-lock-file-only query` to get it to use the lock file instead of needing access to `node_modules`. This works when running from workspace root without `node_modules`, but when you run a Makefile from a sub project without `node_modules` adding this arg/flag still fails 🤷 I've fallen back to just jq-ing the package-lock.json myself at least for the moment so we can unblock the release workflow. If I find a slightly nicer way to do this in the future I'll replace, but I really want to stick to the runtime resolution of things rather than hardcoding paths in several files. How to test: - Run `make clean` to remove all your `node_modules` folders - cd into or use `make -C` to run `make release/prune` from within `packages/kuma-gui` - Verify that `packages/config` has changes to package.json and package-lock.json also has changes. I 'think' this will finally unblock the release workflow 🤞 --- edit: I just checked a this new approach actually works better elsewhere also 🎉 Signed-off-by: John Cowen <[email protected]>
- Loading branch information
Showing
8 changed files
with
26 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const { readFileSync: read } = require('fs') | ||
module.exports = { | ||
depsToDevDeps: (path) => { | ||
const pkg = JSON.parse(read(path, 'utf-8')) | ||
return JSON.stringify({ | ||
...pkg, | ||
dependencies: {}, | ||
peerDependencies: {}, | ||
devDependencies: { | ||
...pkg.dependencies, | ||
...pkg.devDependencies, | ||
}, | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
const { createEslintConfig } = require('./eslint.cjs') | ||
const { createStylelintConfig } = require('./stylelint.cjs') | ||
const ci = require('../scripts/ci.cjs') | ||
|
||
module.exports = { | ||
eslint: createEslintConfig, | ||
stylelint: createStylelintConfig, | ||
ci, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters