mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Enable patch-package in production and in javascripts/discourse (#21078)
When running `yarn install` in a yarn workspace, the lifecycle hooks in the root package.json are not triggered. https://github.com/yarnpkg/yarn/issues/5790 As a workaround, we can additionally run `patch-package` from the `javascripts/discourse/package.json` `postinstall` hook. `patch-package` is idempotent, so it doesn't matter if it is triggered multiple times. Longer term we intend to move to pnpm, which has built-in patch support.
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
"lttf:ignore": "lint-to-the-future ignore",
|
||||
"lttf:output": "lint-to-the-future output -o ./lint-progress/",
|
||||
"lint-progress": "yarn lttf:output && npx html-pages ./lint-progress --no-cache",
|
||||
"postinstall": "yarn --cwd app/assets/javascripts/discourse $(node -e 'if(JSON.parse(process.env.npm_config_argv).original.includes(`--frozen-lockfile`)){console.log(`--frozen-lockfile`)}')"
|
||||
"postinstall": "yarn --cwd app/assets/javascripts $(node -e 'if(JSON.parse(process.env.npm_config_argv).original.includes(`--frozen-lockfile`)){console.log(`--frozen-lockfile`)}')"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.* || >= 18",
|
||||
|
||||
Reference in New Issue
Block a user