Skip to content

A platform for community discussion. Free, open, simple.

DEV: Enable patch-package in production and in `javascripts/discourse` (#21078)

David Taylora328153ec27e
diff --git a/app/assets/javascripts/discourse/package.json b/app/assets/javascripts/discourse/package.json
index 6417951045c..9ea2b9b45f1 100644
--- a/app/assets/javascripts/discourse/package.json
+++ b/app/assets/javascripts/discourse/package.json
@@ -13,7 +13,8 @@
"scripts": {
"build": "ember build",
"start": "ember serve",
- "test": "ember test"
+ "test": "ember test",
+ "postinstall": "yarn --silent --cwd .. patch-package"
},
"dependencies": {
"@babel/core": "^7.21.4",
diff --git a/app/assets/javascripts/package.json b/app/assets/javascripts/package.json
index 9514e583f5e..f4a63513cc1 100644
--- a/app/assets/javascripts/package.json
+++ b/app/assets/javascripts/package.json
@@ -22,9 +22,9 @@
"resolutions": {
"**/babel-plugin-debug-macros": "npm:@discourse/[email protected]"
},
- "devDependencies": {
+ "devDependencies": {},
+ "dependencies": {
"patch-package": "^6.5.1",
"postinstall-postinstall": "^2.1.0"
- },
- "dependencies": {}
+ }
}
diff --git a/package.json b/package.json
index f4b10227cd9..2fb9cad6a9f 100644
--- a/package.json
+++ b/package.json
@@ -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",