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

fix: 🐛 add vercel compatibility with nx #210

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production"],
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
],
"cache": true
},
"e2e": {
"inputs": ["default", "^production"],
"inputs": [
"default",
"^production"
],
"cache": true
},
"build-storybook": {
Expand All @@ -21,7 +29,11 @@
"cache": true
},
"@nx/jest:jest": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"inputs": [
"default",
"^production",
"{workspaceRoot}/jest.preset.js"
],
"cache": true,
"options": {
"passWithNoTests": true
Expand All @@ -34,7 +46,10 @@
}
},
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json"
],
"cache": true
}
},
Expand Down Expand Up @@ -62,8 +77,13 @@
},
"defaultProject": "weshipit",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": ["{workspaceRoot}/babel.config.json"],
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"sharedGlobals": [
"{workspaceRoot}/babel.config.json"
],
"production": [
"default",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
Expand Down Expand Up @@ -94,5 +114,20 @@
}
}
],
"defaultBase": "main"
}
"defaultBase": "main",
"tasksRunnerOptions": {
"default": {
"runner": "@vercel/remote-nx",
"options": {
"cacheableOperations": [
"build",
"test",
"lint",
"e2e"
],
"token": "<token>",
"teamId": "<teamId>"
}
}
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"@types/react-gravatar": "^2.6.10",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"@vercel/remote-nx": "^2.0.0",
"@vitejs/plugin-react": "^4.2.0",
"@vitest/ui": "^1.3.1",
"babel-jest": "29.7.0",
Expand Down
104 changes: 99 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8161,6 +8161,29 @@ __metadata:
languageName: node
linkType: hard

"@vercel/remote-nx@npm:^2.0.0":
version: 2.0.0
resolution: "@vercel/remote-nx@npm:2.0.0"
dependencies:
"@vercel/remote": "npm:1.0.1"
chalk: "npm:^4.1.0"
nx-remotecache-custom: "npm:^17.1.1"
checksum: 10/b4a2a2bbbcc02d3c0d3e089a079d3107c45decb03118ac77977a1c8c32d1d57a299853af8bc051d677ed46bb0a2a79e510b159ac246b733e334e5dbe19a34f27
languageName: node
linkType: hard

"@vercel/remote@npm:1.0.1":
version: 1.0.1
resolution: "@vercel/remote@npm:1.0.1"
dependencies:
ci-info: "npm:^3.4.0"
concat-stream: "npm:^2.0.0"
node-fetch: "npm:^2.6.7"
raw-body: "npm:^2.5.1"
checksum: 10/780d5cb8c569834dd565bb32150d5afa4aacdb40fd40cfbfb242de5bc7bea0d350177b860a4a8110e986ded4d1e5b55d13a43614a3529f7eb0b5531741d4f42d
languageName: node
linkType: hard

"@vitejs/plugin-react@npm:^4.2.0":
version: 4.2.1
resolution: "@vitejs/plugin-react@npm:4.2.1"
Expand Down Expand Up @@ -10189,7 +10212,7 @@ __metadata:
languageName: node
linkType: hard

"ci-info@npm:^3.2.0":
"ci-info@npm:^3.2.0, ci-info@npm:^3.4.0":
version: 3.9.0
resolution: "ci-info@npm:3.9.0"
checksum: 10/75bc67902b4d1c7b435497adeb91598f6d52a3389398e44294f6601b20cfef32cf2176f7be0eb961d9e085bb333a8a5cae121cb22f81cf238ae7f58eb80e9397
Expand Down Expand Up @@ -10659,6 +10682,18 @@ __metadata:
languageName: node
linkType: hard

"concat-stream@npm:^2.0.0":
version: 2.0.0
resolution: "concat-stream@npm:2.0.0"
dependencies:
buffer-from: "npm:^1.0.0"
inherits: "npm:^2.0.3"
readable-stream: "npm:^3.0.2"
typedarray: "npm:^0.0.6"
checksum: 10/250e576d0617e7c58e1c4b2dd6fe69560f316d2c962a409f9f3aac794018499ddb31948b1e4296f217008e124cd5d526432097745157fe504b5d9f3dc469eadb
languageName: node
linkType: hard

"confbox@npm:^0.1.7":
version: 0.1.7
resolution: "confbox@npm:0.1.7"
Expand Down Expand Up @@ -12058,7 +12093,7 @@ __metadata:
languageName: node
linkType: hard

"dotenv@npm:^16.4.4, dotenv@npm:~16.4.5":
"dotenv@npm:^16.0.3, dotenv@npm:^16.4.4, dotenv@npm:~16.4.5":
version: 16.4.5
resolution: "dotenv@npm:16.4.5"
checksum: 10/55a3134601115194ae0f924e54473459ed0d9fc340ae610b676e248cca45aa7c680d86365318ea964e6da4e2ea80c4514c1adab5adb43d6867fb57ff068f95c8
Expand Down Expand Up @@ -18785,6 +18820,20 @@ __metadata:
languageName: node
linkType: hard

"node-fetch@npm:^2.6.7":
version: 2.7.0
resolution: "node-fetch@npm:2.7.0"
dependencies:
whatwg-url: "npm:^5.0.0"
peerDependencies:
encoding: ^0.1.0
peerDependenciesMeta:
encoding:
optional: true
checksum: 10/b24f8a3dc937f388192e59bcf9d0857d7b6940a2496f328381641cb616efccc9866e89ec43f2ec956bbd6c3d3ee05524ce77fe7b29ccd34692b3a16f237d6676
languageName: node
linkType: hard

"node-forge@npm:^1":
version: 1.3.1
resolution: "node-forge@npm:1.3.1"
Expand Down Expand Up @@ -18977,6 +19026,19 @@ __metadata:
languageName: node
linkType: hard

"nx-remotecache-custom@npm:^17.1.1":
version: 17.1.1
resolution: "nx-remotecache-custom@npm:17.1.1"
dependencies:
chalk: "npm:^4.1.2"
dotenv: "npm:^16.0.3"
tar: "npm:^6.1.12"
peerDependencies:
nx: ^17.0.0
checksum: 10/25aba26a85c2c6894c81539b7169525c05ce80758d757d970a1dfd1f041d4891262d7e834ff965bc29aa964a202b2bd24d7c205e73736c139a4a268b741deaf6
languageName: node
linkType: hard

"nx@npm:15.9.3":
version: 15.9.3
resolution: "nx@npm:15.9.3"
Expand Down Expand Up @@ -20856,7 +20918,7 @@ __metadata:
languageName: node
linkType: hard

"raw-body@npm:2.5.2":
"raw-body@npm:2.5.2, raw-body@npm:^2.5.1":
version: 2.5.2
resolution: "raw-body@npm:2.5.2"
dependencies:
Expand Down Expand Up @@ -21059,7 +21121,7 @@ __metadata:
languageName: node
linkType: hard

"readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0":
"readable-stream@npm:^3.0.2, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0":
version: 3.6.2
resolution: "readable-stream@npm:3.6.2"
dependencies:
Expand Down Expand Up @@ -23131,7 +23193,7 @@ __metadata:
languageName: node
linkType: hard

"tar@npm:^6.1.11, tar@npm:^6.1.2, tar@npm:^6.2.0":
"tar@npm:^6.1.11, tar@npm:^6.1.12, tar@npm:^6.1.2, tar@npm:^6.2.0":
version: 6.2.1
resolution: "tar@npm:6.2.1"
dependencies:
Expand Down Expand Up @@ -23411,6 +23473,13 @@ __metadata:
languageName: node
linkType: hard

"tr46@npm:~0.0.3":
version: 0.0.3
resolution: "tr46@npm:0.0.3"
checksum: 10/8f1f5aa6cb232f9e1bdc86f485f916b7aa38caee8a778b378ffec0b70d9307873f253f5cbadbe2955ece2ac5c83d0dc14a77513166ccd0a0c7fe197e21396695
languageName: node
linkType: hard

"tree-dump@npm:^1.0.1":
version: 1.0.2
resolution: "tree-dump@npm:1.0.2"
Expand Down Expand Up @@ -23825,6 +23894,13 @@ __metadata:
languageName: node
linkType: hard

"typedarray@npm:^0.0.6":
version: 0.0.6
resolution: "typedarray@npm:0.0.6"
checksum: 10/2cc1bcf7d8c1237f6a16c04efc06637b2c5f2d74e58e84665445cf87668b85a21ab18dd751fa49eee6ae024b70326635d7b79ad37b1c370ed2fec6aeeeb52714
languageName: node
linkType: hard

"typescript@npm:5.4.2":
version: 5.4.2
resolution: "typescript@npm:5.4.2"
Expand Down Expand Up @@ -24630,6 +24706,13 @@ __metadata:
languageName: node
linkType: hard

"webidl-conversions@npm:^3.0.0":
version: 3.0.1
resolution: "webidl-conversions@npm:3.0.1"
checksum: 10/b65b9f8d6854572a84a5c69615152b63371395f0c5dcd6729c45789052296df54314db2bc3e977df41705eacb8bc79c247cee139a63fa695192f95816ed528ad
languageName: node
linkType: hard

"webidl-conversions@npm:^7.0.0":
version: 7.0.0
resolution: "webidl-conversions@npm:7.0.0"
Expand Down Expand Up @@ -24894,6 +24977,7 @@ __metadata:
"@typescript-eslint/parser": "npm:7.18.0"
"@vercel/analytics": "npm:^1.2.0"
"@vercel/og": "npm:^0.5.20"
"@vercel/remote-nx": "npm:^2.0.0"
"@vitejs/plugin-react": "npm:^4.2.0"
"@vitest/ui": "npm:^1.3.1"
autoprefixer: "npm:^10.4.17"
Expand Down Expand Up @@ -24986,6 +25070,16 @@ __metadata:
languageName: node
linkType: hard

"whatwg-url@npm:^5.0.0":
version: 5.0.0
resolution: "whatwg-url@npm:5.0.0"
dependencies:
tr46: "npm:~0.0.3"
webidl-conversions: "npm:^3.0.0"
checksum: 10/f95adbc1e80820828b45cc671d97da7cd5e4ef9deb426c31bcd5ab00dc7103042291613b3ef3caec0a2335ed09e0d5ed026c940755dbb6d404e2b27f940fdf07
languageName: node
linkType: hard

"which-boxed-primitive@npm:^1.0.2":
version: 1.0.2
resolution: "which-boxed-primitive@npm:1.0.2"
Expand Down