From 9e53d46b7102b862bed372820d38d71e83589f80 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 6 Nov 2023 18:19:40 +0100 Subject: [PATCH] [yarn] Add focus-production script --- .pnp.cjs | 25 +++++++++++++++- ...glob-npm-10.3.10-da1ef8b112-4f2fe2511e.zip | 3 ++ ...kspeak-npm-2.3.6-42e1233172-57d43ad11e.zip | 3 ++ package.json | 4 ++- scripts/focus-production.js | 17 +++++++++++ yarn.lock | 29 +++++++++++++++++++ 6 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 .yarn/cache/glob-npm-10.3.10-da1ef8b112-4f2fe2511e.zip create mode 100644 .yarn/cache/jackspeak-npm-2.3.6-42e1233172-57d43ad11e.zip create mode 100644 scripts/focus-production.js diff --git a/.pnp.cjs b/.pnp.cjs index 811cff8d7..6c1b48746 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -3300,7 +3300,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ [\ "glob",\ - "npm:7.2.3"\ + "npm:10.3.10"\ ],\ [\ "glob-parent",\ @@ -7024,6 +7024,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["cross-env", "npm:7.0.3"],\ ["cypress", "npm:10.11.0"],\ ["execa", "npm:5.1.1"],\ + ["glob", "npm:10.3.10"],\ ["gulp", "npm:4.0.2"],\ ["gulp-cssnano", "npm:2.1.3"],\ ["gulp-rename", "npm:2.0.0"],\ @@ -19999,6 +20000,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["glob", [\ + ["npm:10.3.10", {\ + "packageLocation": "./.yarn/cache/glob-npm-10.3.10-da1ef8b112-4f2fe2511e.zip/node_modules/glob/",\ + "packageDependencies": [\ + ["glob", "npm:10.3.10"],\ + ["foreground-child", "npm:3.1.1"],\ + ["jackspeak", "npm:2.3.6"],\ + ["minimatch", "npm:9.0.3"],\ + ["minipass", "npm:7.0.2"],\ + ["path-scurry", "npm:1.10.1"]\ + ],\ + "linkType": "HARD"\ + }],\ ["npm:10.3.3", {\ "packageLocation": "./.yarn/cache/glob-npm-10.3.3-2d9abea8c7-29190d3291.zip/node_modules/glob/",\ "packageDependencies": [\ @@ -20914,6 +20927,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["cross-env", "npm:7.0.3"],\ ["cypress", "npm:10.11.0"],\ ["execa", "npm:5.1.1"],\ + ["glob", "npm:10.3.10"],\ ["gulp", "npm:4.0.2"],\ ["gulp-cssnano", "npm:2.1.3"],\ ["gulp-rename", "npm:2.0.0"],\ @@ -22146,6 +22160,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@pkgjs/parseargs", "npm:0.11.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:2.3.6", {\ + "packageLocation": "./.yarn/cache/jackspeak-npm-2.3.6-42e1233172-57d43ad11e.zip/node_modules/jackspeak/",\ + "packageDependencies": [\ + ["jackspeak", "npm:2.3.6"],\ + ["@isaacs/cliui", "npm:8.0.2"],\ + ["@pkgjs/parseargs", "npm:0.11.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["jake", [\ diff --git a/.yarn/cache/glob-npm-10.3.10-da1ef8b112-4f2fe2511e.zip b/.yarn/cache/glob-npm-10.3.10-da1ef8b112-4f2fe2511e.zip new file mode 100644 index 000000000..2a7986789 --- /dev/null +++ b/.yarn/cache/glob-npm-10.3.10-da1ef8b112-4f2fe2511e.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf06b937892ee3219f0e6771c9327b56dec8d0e951cf3942d4f579752eaa363c +size 132308 diff --git a/.yarn/cache/jackspeak-npm-2.3.6-42e1233172-57d43ad11e.zip b/.yarn/cache/jackspeak-npm-2.3.6-42e1233172-57d43ad11e.zip new file mode 100644 index 000000000..f63f57822 --- /dev/null +++ b/.yarn/cache/jackspeak-npm-2.3.6-42e1233172-57d43ad11e.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2279204ba218d4fa14f272a8acda52b27671a1a9bfff333c555282880a1a73e1 +size 65669 diff --git a/package.json b/package.json index 940373174..677390153 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "format": "yarn workspaces foreach -p run format", "clean": "node ./scripts/clean.js", "clean-all": "node ./scripts/clean-all.js", - "cleanall": "yarn clean-all" + "cleanall": "yarn clean-all", + "focus-production": "node ./scripts/focus-production.js" }, "workspaces": [ "packages/backend", @@ -58,6 +59,7 @@ "cross-env": "7.0.3", "cypress": "10.11.0", "execa": "5.1.1", + "glob": "^10.3.10", "gulp": "4.0.2", "gulp-cssnano": "2.1.3", "gulp-rename": "2.0.0", diff --git a/scripts/focus-production.js b/scripts/focus-production.js new file mode 100644 index 000000000..a556d489e --- /dev/null +++ b/scripts/focus-production.js @@ -0,0 +1,17 @@ +const { globSync } = require('glob'); +const { join } = require("node:path"); +const fs = require("node:fs"); +const exec = require("execa"); + +const files = globSync('**/package.json'); + +for (const file of files) { + const json = require(join('../', file)); + json['devDependencies'] = undefined; + fs.writeFileSync(file, JSON.stringify(json, null, '\t')); +} + +exec("yarn", ["install"], { + stdout: process.stdout, + stderr: process.stderr, +}); diff --git a/yarn.lock b/yarn.lock index db3399f54..cbd2241e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10452,6 +10452,21 @@ __metadata: languageName: node linkType: hard +"glob@npm:^10.3.10": + version: 10.3.10 + resolution: "glob@npm:10.3.10" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^2.3.5 + minimatch: ^9.0.1 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + path-scurry: ^1.10.1 + bin: + glob: dist/esm/bin.mjs + checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3 + languageName: node + linkType: hard + "glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -11241,6 +11256,7 @@ __metadata: cross-env: 7.0.3 cypress: 10.11.0 execa: 5.1.1 + glob: ^10.3.10 gulp: 4.0.2 gulp-cssnano: 2.1.3 gulp-rename: 2.0.0 @@ -12315,6 +12331,19 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^2.3.5": + version: 2.3.6 + resolution: "jackspeak@npm:2.3.6" + dependencies: + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54 + languageName: node + linkType: hard + "jake@npm:^10.8.5": version: 10.8.7 resolution: "jake@npm:10.8.7"