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

chore(core): auto-update vendored lockdown.umd.js #1078

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .config/lint-staged.config.js
@@ -1,8 +1,11 @@
const path = require('node:path')

// @ts-check

/** @type {import('lint-staged').Config} */
module.exports = {
'*.js': ['eslint --fix', 'prettier --write'],
'*.(ts|md|ya?ml|json)': ['prettier --write'],
'!((package-lock|policy)*).json': ['prettier --write'],
'package-lock.json': () => ['npm run -w lavamoat-core lib:ses'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'package-lock.json': () => ['npm run -w lavamoat-core lib:ses'],
'package-lock.json': () => ['npm run -w lavamoat-core lib:ses && git add -A ./packages/core/lib/lockdown.umd.js'],

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the package scripts like this shouldn't be modifying the local git environment, any drawback to moving it into the lint-script?

}
2 changes: 1 addition & 1 deletion packages/core/package.json
Expand Up @@ -29,7 +29,7 @@
"!*.tsbuildinfo"
],
"scripts": {
"lib:ses": "cp ../../node_modules/ses/dist/lockdown.umd.js ./lib/lockdown.umd.js",
"lib:ses": "cp ../../node_modules/ses/dist/lockdown.umd.js ./lib/lockdown.umd.js && git add -A ./lib/lockdown.umd.js",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"lib:ses": "cp ../../node_modules/ses/dist/lockdown.umd.js ./lib/lockdown.umd.js && git add -A ./lib/lockdown.umd.js",
"lib:ses": "cp ../../node_modules/ses/dist/lockdown.umd.js ./lib/lockdown.umd.js",

I think the package scripts like this shouldn't be modifying the local git environment, any drawback to moving it into the lint-script?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure (I had it this way originally but changed it for reasons that escape me)

"lint:deps": "depcheck",
"test": "ava && npm run test:ses",
"test:ses": "diff -wq ../../node_modules/ses/dist/lockdown.umd.js ./lib/lockdown.umd.js"
Expand Down