Skip to content

Commit

Permalink
feat: turborepo setup
Browse files Browse the repository at this point in the history
  • Loading branch information
abretonc7s committed Jan 15, 2025
1 parent ea14232 commit b97ddcb
Show file tree
Hide file tree
Showing 7 changed files with 165 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,6 @@ packages/devreact/webpack.config.json

# Local Netlify folder
.netlify

# Turborepo
.turbo
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"postinstall": "patch-package",
"link-packages": "./scripts/link-packages.sh",
"prepare": "husky install",
"dev:core": "turbo run dev --parallel --filter=@metamask/sdk-communication-layer --filter=@metamask/sdk --filter=@metamask/sdk-react",
"lint": "yarn workspaces foreach --no-private run lint",
"lint:changelogs": "yarn workspaces foreach --no-private run lint:changelog",
"lint:eslint": "yarn workspaces foreach --no-private run lint:eslint",
Expand Down Expand Up @@ -86,6 +87,8 @@
"rimraf": "^3.0.2",
"serve": "^14.2.1",
"ts-jest": "^29.0.3",
"turbo": "^2.3.3",
"turborepo": "^0.0.1",
"typescript": "^4.3.5"
},
"engines": {
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk-communication-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"build:clean": "yarn clean && yarn build",
"build": "yarn build:types && rollup -c --bundleConfigAsCjs",
"build:dev": "yarn build:types && NODE_ENV=dev rollup -c --bundleConfigAsCjs",
"dev": "concurrently \"tsc --watch\" \"rollup -c --bundleConfigAsCjs -w\"",
"build:post-tsc": "echo 'N/A'",
"build:pre-tsc": "echo 'N/A'",
"size": "size-limit",
Expand Down Expand Up @@ -69,6 +70,7 @@
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"concurrently": "^9.1.2",
"cross-fetch": "^4.0.0",
"eciesjs": "^0.4.11",
"eslint": "^7.30.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"build:post-tsc": "echo 'N/A'",
"build:pre-tsc": "echo 'N/A'",
"clean": "rimraf dist",
"dev": "rollup -c -w",
"dev": "rollup -c -w --bundleConfigAsCjs",
"lint": "yarn lint:eslint && yarn lint:misc --check",
"lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk-react",
"lint:eslint": "eslint . --cache --ext js,ts",
Expand Down
6 changes: 4 additions & 2 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly --outDir dist/types",
"build": "yarn build:types && rollup -c --bundleConfigAsCjs",
"build:clean": "yarn clean && yarn build",
"build:dev": "yarn build:types && NODE_ENV=dev rollup -c --bundleConfigAsCjs",
"build:post-tsc": "echo 'N/A'",
"build:pre-tsc": "echo 'N/A'",
"typecheck": "tsc --noEmit",
Expand All @@ -44,7 +43,9 @@
"test:e2e": "jest --testPathPattern \"/e2e/\"",
"test:ci": "jest --coverage --passWithNoTests --setupFilesAfterEnv ./jest-preload.js --testPathIgnorePatterns \"/e2e/\"",
"test:dev": "jest -c ./jest.config.ts --detectOpenHandles --testPathIgnorePatterns \"/e2e/\"",
"watch": "rollup -c -w"
"watch": "rollup -c -w",
"dev": "concurrently \"tsc --watch\" \"rollup -c -w --bundleConfigAsCjs\"",
"build:dev": "yarn build:types && NODE_ENV=dev rollup -c --bundleConfigAsCjs"
},
"dependencies": {
"@babel/runtime": "^7.26.0",
Expand Down Expand Up @@ -91,6 +92,7 @@
"@typescript-eslint/parser": "^4.26.0",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"concurrently": "^9.1.2",
"crypto-browserify": "^3.12.0",
"eslint": "^7.30.0",
"eslint-config-prettier": "^8.3.0",
Expand Down
34 changes: 34 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": [
"**/.env.*local"
],
"globalEnv": [
"NODE_ENV",
"SITEED_NPM_TOKEN"
],
"tasks": {
"build": {
"dependsOn": [
"^build"
],
"outputs": [
"dist/**",
".next/**"
]
},
"check-types": {
"dependsOn": [
"^check-types"
]
},
"lint": {
"outputs": []
},
"dev": {
"cache": false,
"persistent": true,
"outputs": ["dist/**"]
}
}
}
120 changes: 118 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10939,6 +10939,7 @@ __metadata:
"@typescript-eslint/eslint-plugin": ^4.26.0
"@typescript-eslint/parser": ^4.26.0
bufferutil: ^4.0.8
concurrently: ^9.1.2
cross-fetch: ^4.0.0
date-fns: ^2.29.3
debug: ^4.3.4
Expand Down Expand Up @@ -11580,6 +11581,7 @@ __metadata:
bowser: ^2.9.0
browserify-zlib: ^0.2.0
buffer: ^6.0.3
concurrently: ^9.1.2
cross-fetch: ^4.0.0
crypto-browserify: ^3.12.0
debug: ^4.3.4
Expand Down Expand Up @@ -25325,6 +25327,24 @@ __metadata:
languageName: node
linkType: hard

"concurrently@npm:^9.1.2":
version: 9.1.2
resolution: "concurrently@npm:9.1.2"
dependencies:
chalk: ^4.1.2
lodash: ^4.17.21
rxjs: ^7.8.1
shell-quote: ^1.8.1
supports-color: ^8.1.1
tree-kill: ^1.2.2
yargs: ^17.7.2
bin:
conc: dist/bin/concurrently.js
concurrently: dist/bin/concurrently.js
checksum: 9e25e8ee6272ada26739aff1fb43e96ac458fafca82f45b8360bdd9115d60bbc679d282dfc52001b861b6e9f32b3063aed975691d8dec9e62807a9679763a1d8
languageName: node
linkType: hard

"confusing-browser-globals@npm:^1.0.11":
version: 1.0.11
resolution: "confusing-browser-globals@npm:1.0.11"
Expand Down Expand Up @@ -38093,6 +38113,8 @@ __metadata:
serve: ^14.2.1
ts-jest: ^29.0.3
ts-node: ^10.9.1
turbo: ^2.3.3
turborepo: ^0.0.1
typescript: ^4.3.5
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -45998,7 +46020,7 @@ __metadata:
languageName: node
linkType: hard

"rxjs@npm:^7.5.5, rxjs@npm:^7.8.0":
"rxjs@npm:^7.5.5, rxjs@npm:^7.8.0, rxjs@npm:^7.8.1":
version: 7.8.1
resolution: "rxjs@npm:7.8.1"
dependencies:
Expand Down Expand Up @@ -46687,6 +46709,13 @@ __metadata:
languageName: node
linkType: hard

"shell-quote@npm:^1.8.1":
version: 1.8.2
resolution: "shell-quote@npm:1.8.2"
checksum: 1e97b62ced1c4c5135015978ebf273bed1f425a68cf84163e83fbb0f34b3ff9471e656720dab2b7cbb4ae0f58998e686d17d166c28dfb3662acd009e8bd7faed
languageName: node
linkType: hard

"side-channel@npm:^1.0.4":
version: 1.0.4
resolution: "side-channel@npm:1.0.4"
Expand Down Expand Up @@ -48168,7 +48197,7 @@ __metadata:
languageName: node
linkType: hard

"supports-color@npm:^8.0.0":
"supports-color@npm:^8.0.0, supports-color@npm:^8.1.1":
version: 8.1.1
resolution: "supports-color@npm:8.1.1"
dependencies:
Expand Down Expand Up @@ -49022,6 +49051,15 @@ __metadata:
languageName: node
linkType: hard

"tree-kill@npm:^1.2.2":
version: 1.2.2
resolution: "tree-kill@npm:1.2.2"
bin:
tree-kill: cli.js
checksum: 49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7
languageName: node
linkType: hard

"trim-newlines@npm:^3.0.0":
version: 3.0.1
resolution: "trim-newlines@npm:3.0.1"
Expand Down Expand Up @@ -49247,13 +49285,91 @@ __metadata:
languageName: node
linkType: hard

"turbo-darwin-64@npm:2.3.3":
version: 2.3.3
resolution: "turbo-darwin-64@npm:2.3.3"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"turbo-darwin-arm64@npm:2.3.3":
version: 2.3.3
resolution: "turbo-darwin-arm64@npm:2.3.3"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"turbo-linux-64@npm:2.3.3":
version: 2.3.3
resolution: "turbo-linux-64@npm:2.3.3"
conditions: os=linux & cpu=x64
languageName: node
linkType: hard

"turbo-linux-arm64@npm:2.3.3":
version: 2.3.3
resolution: "turbo-linux-arm64@npm:2.3.3"
conditions: os=linux & cpu=arm64
languageName: node
linkType: hard

"turbo-stream@npm:^2.0.0":
version: 2.2.0
resolution: "turbo-stream@npm:2.2.0"
checksum: c8006f601ff851e0ec8d2a4e983712f5c3e06805f0fc291c8b5d4004b51bee587dd7f92b059e8ad0b05572ed5c44a91c8e9ea1fbf2d4c29bef23f79fdf7e1099
languageName: node
linkType: hard

"turbo-windows-64@npm:2.3.3":
version: 2.3.3
resolution: "turbo-windows-64@npm:2.3.3"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard

"turbo-windows-arm64@npm:2.3.3":
version: 2.3.3
resolution: "turbo-windows-arm64@npm:2.3.3"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"turbo@npm:^2.3.3":
version: 2.3.3
resolution: "turbo@npm:2.3.3"
dependencies:
turbo-darwin-64: 2.3.3
turbo-darwin-arm64: 2.3.3
turbo-linux-64: 2.3.3
turbo-linux-arm64: 2.3.3
turbo-windows-64: 2.3.3
turbo-windows-arm64: 2.3.3
dependenciesMeta:
turbo-darwin-64:
optional: true
turbo-darwin-arm64:
optional: true
turbo-linux-64:
optional: true
turbo-linux-arm64:
optional: true
turbo-windows-64:
optional: true
turbo-windows-arm64:
optional: true
bin:
turbo: bin/turbo
checksum: b495ad024c2586fd090d3aabcc1263a89d72ee96d93b2259b553d9c931e22056a388e030a51bd70a11ec8bec373d1cb0a6ef0931806e8a283cb8360c000d0538
languageName: node
linkType: hard

"turborepo@npm:^0.0.1":
version: 0.0.1
resolution: "turborepo@npm:0.0.1"
checksum: 4975a23063185a87729f5de4fdb42c2118b52d88263128fa1416fe651798725a8d9f3e8a10a099d1188bd5ae04a39a93fe39810ced7e9187230ae9aa3ba645cf
languageName: node
linkType: hard

"tweetnacl-util@npm:^0.15.1":
version: 0.15.1
resolution: "tweetnacl-util@npm:0.15.1"
Expand Down

0 comments on commit b97ddcb

Please sign in to comment.