From 02372057ec8324df6b68c828bf7b8cce0c398597 Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Fri, 26 Jul 2024 09:18:46 +0200 Subject: [PATCH 1/6] chore(lint): Make `yarn lint` lint both the FW and CRWRSCA --- package.json | 5 ++++- yarn.lock | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 31660bf266b5..27b8ee73253c 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,9 @@ "clean:prisma": "rimraf node_modules/.prisma/client && node node_modules/@prisma/client/scripts/postinstall.js", "e2e": "node ./tasks/run-e2e", "generate-dependency-graph": "node ./tasks/generateDependencyGraph.mjs", - "lint": "RWJS_CWD=packages/create-redwood-app/templates/ts eslint --config .eslintrc.js --ignore-pattern Routes.jsx --ignore-pattern create-redwood-rsc-app packages", + "lint": "concurrently -c auto npm:lint:fw npm:lint:crwrsca", + "lint:crwrsca": "yarn --cwd packages/create-redwood-rsc-app run lint", + "lint:fw": "RWJS_CWD=packages/create-redwood-app/templates/ts eslint --config .eslintrc.js --ignore-pattern Routes.jsx --ignore-pattern create-redwood-rsc-app packages", "lint:fix": "yarn lint --fix", "project:copy": "node ./tasks/framework-tools/frameworkFilesToProject.mjs", "project:deps": "node ./tasks/framework-tools/frameworkDepsToProject.mjs", @@ -82,6 +84,7 @@ "babel-plugin-auto-import": "1.1.0", "babel-plugin-remove-code": "0.0.6", "boxen": "5.1.2", + "concurrently": "8.2.2", "core-js": "3.37.1", "cypress": "13.13.1", "cypress-fail-fast": "7.1.0", diff --git a/yarn.lock b/yarn.lock index 0b796142e749..26576b4f9afe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26512,6 +26512,7 @@ __metadata: babel-plugin-auto-import: "npm:1.1.0" babel-plugin-remove-code: "npm:0.0.6" boxen: "npm:5.1.2" + concurrently: "npm:8.2.2" core-js: "npm:3.37.1" cypress: "npm:13.13.1" cypress-fail-fast: "npm:7.1.0" From 4e6056a572766e4f003867d4c8f77d895b68bb3d Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Fri, 26 Jul 2024 10:29:16 +0200 Subject: [PATCH 2/6] yarn install:ci --- .github/actions/set-up-job/action.yml | 6 +++--- package.json | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/actions/set-up-job/action.yml b/.github/actions/set-up-job/action.yml index f7a4eecce262..8c05499b1218 100644 --- a/.github/actions/set-up-job/action.yml +++ b/.github/actions/set-up-job/action.yml @@ -8,7 +8,7 @@ inputs: description: > For some actions, setting up the yarn cache takes longer than it would to just yarn install. required: false - default: true + default: 'true' yarn-install-directory: description: > @@ -19,7 +19,7 @@ inputs: description: > Whether or not to run `yarn build` to build all the framework packages. required: false - default: true + default: 'true' runs: using: composite @@ -53,7 +53,7 @@ runs: working-directory: ${{ inputs.yarn-install-directory }} env: GITHUB_TOKEN: ${{ github.token }} - run: yarn install --inline-builds + run: yarn install:ci - name: 🏗️ Build if: inputs.build == 'true' diff --git a/package.json b/package.json index 27b8ee73253c..7de253437dca 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "!packages/create-redwood-rsc-app" ], "scripts": { - "build": "nx run-many -t build", + "build": "nx run-many -t build && yarn build:crwrsca", + "build:crwrsca": "yarn --cwd packages/create-redwood-rsc-app build", "build:clean": "node ./tasks/clean.mjs", "build:clean:super": "git clean -fdx && yarn && yarn build", "build:pack": "nx run-many -t build:pack", @@ -24,6 +25,10 @@ "clean:prisma": "rimraf node_modules/.prisma/client && node node_modules/@prisma/client/scripts/postinstall.js", "e2e": "node ./tasks/run-e2e", "generate-dependency-graph": "node ./tasks/generateDependencyGraph.mjs", + "install:all": "concurrently -g -c auto -n install:fw \"yarn install\" npm:install:crwrsca", + "install:ci": "concurrently -g -c auto -n install:fw:ci \"yarn install --inline-builds\" npm:install:crwrsca:ci", + "install:crwrsca": "yarn --cwd packages/create-redwood-rsc-app install", + "install:crwrsca:ci": "yarn --cwd packages/create-redwood-rsc-app install --inline-builds", "lint": "concurrently -c auto npm:lint:fw npm:lint:crwrsca", "lint:crwrsca": "yarn --cwd packages/create-redwood-rsc-app run lint", "lint:fw": "RWJS_CWD=packages/create-redwood-app/templates/ts eslint --config .eslintrc.js --ignore-pattern Routes.jsx --ignore-pattern create-redwood-rsc-app packages", From 1cd8a81d096ff3d27d0f73e66d05328fe79e16da Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Fri, 26 Jul 2024 11:01:48 +0200 Subject: [PATCH 3/6] try different approach to installing --- .github/actions/set-up-job/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/set-up-job/action.yml b/.github/actions/set-up-job/action.yml index 8c05499b1218..5722e01d8097 100644 --- a/.github/actions/set-up-job/action.yml +++ b/.github/actions/set-up-job/action.yml @@ -53,7 +53,7 @@ runs: working-directory: ${{ inputs.yarn-install-directory }} env: GITHUB_TOKEN: ${{ github.token }} - run: yarn install:ci + run: yarn install --inline-builds && yarn --cwd packages/create-redwood-rsc-app install --inline-builds - name: 🏗️ Build if: inputs.build == 'true' From 15fdd8e2c2b2f72a7e3386f1e0c9b3ebcda6ac90 Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Fri, 26 Jul 2024 11:26:21 +0200 Subject: [PATCH 4/6] lint && --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7de253437dca..8c791924ac76 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,8 @@ "install:ci": "concurrently -g -c auto -n install:fw:ci \"yarn install --inline-builds\" npm:install:crwrsca:ci", "install:crwrsca": "yarn --cwd packages/create-redwood-rsc-app install", "install:crwrsca:ci": "yarn --cwd packages/create-redwood-rsc-app install --inline-builds", - "lint": "concurrently -c auto npm:lint:fw npm:lint:crwrsca", + "lint": "yarn lint:fw && yarn lint:crwrsca", + "lint:c": "concurrently -c auto npm:lint:fw npm:lint:crwrsca", "lint:crwrsca": "yarn --cwd packages/create-redwood-rsc-app run lint", "lint:fw": "RWJS_CWD=packages/create-redwood-app/templates/ts eslint --config .eslintrc.js --ignore-pattern Routes.jsx --ignore-pattern create-redwood-rsc-app packages", "lint:fix": "yarn lint --fix", From 5c56be231b066d3cd67d8d66675b7f7b8d866fbd Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Fri, 26 Jul 2024 15:54:15 +0200 Subject: [PATCH 5/6] lint cross-env --- package.json | 3 ++- yarn.lock | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8c791924ac76..2df1e1985c99 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "lint": "yarn lint:fw && yarn lint:crwrsca", "lint:c": "concurrently -c auto npm:lint:fw npm:lint:crwrsca", "lint:crwrsca": "yarn --cwd packages/create-redwood-rsc-app run lint", - "lint:fw": "RWJS_CWD=packages/create-redwood-app/templates/ts eslint --config .eslintrc.js --ignore-pattern Routes.jsx --ignore-pattern create-redwood-rsc-app packages", + "lint:fw": "cross-env RWJS_CWD=packages/create-redwood-app/templates/ts eslint --config .eslintrc.js --ignore-pattern Routes.jsx --ignore-pattern create-redwood-rsc-app packages", "lint:fix": "yarn lint --fix", "project:copy": "node ./tasks/framework-tools/frameworkFilesToProject.mjs", "project:deps": "node ./tasks/framework-tools/frameworkDepsToProject.mjs", @@ -92,6 +92,7 @@ "boxen": "5.1.2", "concurrently": "8.2.2", "core-js": "3.37.1", + "cross-env": "7.0.3", "cypress": "13.13.1", "cypress-fail-fast": "7.1.0", "cypress-wait-until": "3.0.2", diff --git a/yarn.lock b/yarn.lock index 26576b4f9afe..c1828ffc2d90 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26514,6 +26514,7 @@ __metadata: boxen: "npm:5.1.2" concurrently: "npm:8.2.2" core-js: "npm:3.37.1" + cross-env: "npm:7.0.3" cypress: "npm:13.13.1" cypress-fail-fast: "npm:7.1.0" cypress-wait-until: "npm:3.0.2" From d9be6d3792bc72c80f44b0d18ac23fb148e3538b Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Fri, 26 Jul 2024 16:06:46 +0200 Subject: [PATCH 6/6] fix build in different PR --- package.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2df1e1985c99..6f54f99ed395 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,7 @@ "!packages/create-redwood-rsc-app" ], "scripts": { - "build": "nx run-many -t build && yarn build:crwrsca", - "build:crwrsca": "yarn --cwd packages/create-redwood-rsc-app build", + "build": "nx run-many -t build", "build:clean": "node ./tasks/clean.mjs", "build:clean:super": "git clean -fdx && yarn && yarn build", "build:pack": "nx run-many -t build:pack", @@ -29,8 +28,7 @@ "install:ci": "concurrently -g -c auto -n install:fw:ci \"yarn install --inline-builds\" npm:install:crwrsca:ci", "install:crwrsca": "yarn --cwd packages/create-redwood-rsc-app install", "install:crwrsca:ci": "yarn --cwd packages/create-redwood-rsc-app install --inline-builds", - "lint": "yarn lint:fw && yarn lint:crwrsca", - "lint:c": "concurrently -c auto npm:lint:fw npm:lint:crwrsca", + "lint": "concurrently -c auto npm:lint:fw npm:lint:crwrsca", "lint:crwrsca": "yarn --cwd packages/create-redwood-rsc-app run lint", "lint:fw": "cross-env RWJS_CWD=packages/create-redwood-app/templates/ts eslint --config .eslintrc.js --ignore-pattern Routes.jsx --ignore-pattern create-redwood-rsc-app packages", "lint:fix": "yarn lint --fix",