Add helper tool for making sure build, lint, and test are run through Turborepo (#33573)

* Add helper tool for making sure build, lint, and test are run through Turborepo

* Update node version for require-turbo
This commit is contained in:
jonathansadowski 2022-06-28 13:17:05 -05:00 committed by GitHub
parent 98cf4e7160
commit d48a0b2d90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 292 additions and 67 deletions

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -42,6 +42,7 @@
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"jest-mock-extended": "^1.0.18",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"
@ -52,10 +53,10 @@
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"build": "tsc --build",
"build": "node ./node_modules/require-turbo && tsc --build",
"start": "tsc --build --watch",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"prepack": "pnpm run clean && pnpm run build"
},

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -9,7 +9,7 @@
"e2e:hello": "jest --group=hello",
"make:collection": "node utils/api-collection/build-collection.js",
"report": "allure generate --clean && allure serve",
"lint": "eslint data endpoints tests utils --ext=js,ts,tsx",
"lint": "node ./node_modules/require-turbo && eslint data endpoints tests utils --ext=js,ts,tsx",
"lint:fix": "eslint data endpoints tests utils --ext=js,ts,tsx --fix"
},
"repository": {
@ -32,7 +32,8 @@
},
"devDependencies": {
"@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.12.0"
"eslint": "^8.12.0",
"require-turbo": "workspace:*"
},
"publishConfig": {
"access": "public"

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -30,11 +30,11 @@
"changelog": "composer exec -- changelogger",
"clean": "rm -rf ./dist ./tsconfig.tsbuildinfo",
"compile": "tsc -b",
"build": "pnpm run clean && npm run compile",
"build": "node ./node_modules/require-turbo && pnpm run clean && npm run compile",
"prepack": "pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest"
"test": "node ./node_modules/require-turbo && jest"
},
"dependencies": {
"axios": "^0.24.0",
@ -50,6 +50,7 @@
"axios-mock-adapter": "^1.20.0",
"eslint": "^8.2.0",
"jest": "^25",
"require-turbo": "workspace:*",
"ts-jest": "^25",
"typescript": "^4.4.4"
},

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -106,6 +106,7 @@
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"sass-loader": "^10.2.1",
"ts-jest": "^27.1.3",
@ -116,15 +117,15 @@
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"build": "pnpm run build:js && pnpm run build:css",
"build": "node ./node_modules/require-turbo && pnpm run build:js && pnpm run build:css",
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build:css": "webpack",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"lint": "eslint src --ext=js,ts,tsx",
"lint": "node ./node_modules/require-turbo && eslint src --ext=js,ts,tsx",
"lint:fix": "eslint src --ext=js,ts,tsx --fix",
"prepack": "pnpm run clean && pnpm run build",
"start": "concurrently \"tsc --build ./tsconfig.json --watch\" \"webpack --watch\"",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test:update-snapshots": "pnpm run test -- --updateSnapshot",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -32,12 +32,12 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": {
@ -46,6 +46,7 @@
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -35,12 +35,12 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": {
@ -49,6 +49,7 @@
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -49,6 +49,7 @@
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"sass-loader": "^10.2.1",
"ts-jest": "^27.1.3",
@ -64,14 +65,14 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm run build:js && pnpm run build:css",
"build": "node ./node_modules/require-turbo && pnpm run build:js && pnpm run build:css",
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -58,6 +58,7 @@
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"redux": "^4.1.0",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"
@ -72,12 +73,12 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -36,6 +36,7 @@
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"
@ -50,12 +51,12 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -29,6 +29,7 @@
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2",
@ -38,7 +39,7 @@
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix"
},
"lint-staged": {

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -38,7 +38,7 @@
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"lint": "eslint ./rules ./configs",
"lint": "node ./node_modules/require-turbo && eslint ./rules ./configs",
"lint:fix": "eslint ./rules ./configs --fix"
},
"devDependencies": {
@ -46,6 +46,7 @@
"eslint": "^8.11.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -62,6 +62,7 @@
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"sass-loader": "^10.2.1",
"ts-jest": "^27.1.3",
@ -77,14 +78,14 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm run build:js && pnpm run build:css",
"build": "node ./node_modules/require-turbo && pnpm run build:js && pnpm run build:css",
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -42,6 +42,7 @@
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"
@ -50,12 +51,12 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -17,7 +17,7 @@
},
"homepage": "https://github.com/woocommerce/woocommerce#readme",
"scripts": {
"lint": "eslint build.js",
"node ./node_modules/require-turbo && lint": "eslint build.js",
"lint:fix": "eslint build.js --fix"
},
"devDependencies": {
@ -27,7 +27,8 @@
"eslint": "^8.12.0",
"glob": "^7.2.0",
"mkdirp": "^1.0.4",
"lodash": "^4.17.21"
"lodash": "^4.17.21",
"require-turbo": "workspace:*"
},
"lint-staged": {
"*.(t|j)s?(x)": [

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -17,11 +17,11 @@
"main": "build/util/index.js",
"module": "build-module/util/index.js",
"scripts": {
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"ts:check": "tsc --noEmit --project ./tsconfig.json",
"clean": "pnpm exec rimraf *.tsbuildinfo build build-*",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix"
},
"dependencies": {
@ -38,6 +38,7 @@
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -29,7 +29,7 @@
"webpack-rtl-plugin": "^2.0.0"
},
"scripts": {
"lint": "eslint index.js",
"lint": "node ./node_modules/require-turbo && eslint index.js",
"lint:fix": "eslint index.js --fix"
},
"private": true,
@ -39,6 +39,7 @@
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2",

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -42,12 +42,12 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": {
@ -57,6 +57,7 @@
"@babel/runtime": "^7.17.2",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -38,10 +38,10 @@
"private": true,
"scripts": {
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix"
},
"devDependencies": {
@ -52,6 +52,7 @@
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"redux": "^4.2.0",
"require-turbo": "workspace*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -30,12 +30,12 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix",
"test": "jest --config ./jest.config.json",
"test": "node ./node_modules/require-turbo && jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": {
@ -45,6 +45,7 @@
"@babel/runtime": "^7.17.2",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -47,6 +47,7 @@
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"sass-loader": "^10.2.1",
"ts-jest": "^27.1.3",
@ -58,12 +59,12 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm run build:js && pnpm run build:css",
"build": "node ./node_modules/require-turbo && pnpm run build:js && pnpm run build:css",
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix"
},
"lint-staged": {

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -31,10 +31,10 @@
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint": "node ./node_modules/require-turbo && eslint src",
"lint:fix": "eslint src --fix"
},
"devDependencies": {
@ -44,6 +44,7 @@
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -10,7 +10,7 @@
},
"scripts": {
"analyze": "cross-env NODE_ENV=production ANALYZE=true webpack",
"build": "pnpm run install-if-deps-outdated && pnpm run clean && WC_ADMIN_PHASE=core pnpm run build:packages && WC_ADMIN_PHASE=core pnpm run build:feature-config && cross-env NODE_ENV=production WC_ADMIN_PHASE=core webpack",
"build": "node ./node_modules/require-turbo && pnpm run install-if-deps-outdated && pnpm run clean && WC_ADMIN_PHASE=core pnpm run build:packages && WC_ADMIN_PHASE=core pnpm run build:feature-config && cross-env NODE_ENV=production WC_ADMIN_PHASE=core webpack",
"build:feature-config": "php ../woocommerce/bin/generate-feature-config.php",
"build:packages": "cross-env NODE_ENV=production pnpm run:packages -- build",
"clean": "rimraf ../woocommerce/assets/client/admin/* && pnpm run:packages -- clean --parallel",
@ -22,7 +22,7 @@
"preinstall": "npx only-allow pnpm",
"install-if-deps-outdated": "node bin/install-if-deps-outdated.js",
"install-if-no-packages": "node bin/install-if-no-packages.js",
"lint": "pnpm run lint:js && pnpm run lint:css",
"lint": "node ./node_modules/require-turbo && pnpm run lint:js && pnpm run lint:css",
"lint:fix": "pnpm lint:js-fix && pnpm lint:css-fix",
"lint:css": "stylelint '**/*.scss'",
"lint:css-fix": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'",
@ -42,7 +42,7 @@
"start": "pnpm run install-if-deps-outdated && cross-env WC_ADMIN_PHASE=development pnpm run build:packages && cross-env WC_ADMIN_PHASE=development pnpm run build:feature-config && concurrently \"cross-env WC_ADMIN_PHASE=development webpack --watch\" \"cross-env WC_ADMIN_PHASE=development pnpm run:packages -- start --parallel\"",
"start:package": "pnpm run:packages -- start --parallel",
"pretest": "pnpm run -s install-if-no-packages",
"test": "pnpm run test:client",
"test": "node ./node_modules/require-turbo && pnpm run test:client",
"test-staged": "pnpm run test:client -- --bail --findRelatedTests",
"test:client": "jest --config client/jest.config.js",
"test:debug": "node --inspect-brk ./node_modules/.bin/jest --config client/jest.config.js --watch --runInBand --no-cache",
@ -204,6 +204,7 @@
"raw-loader": "^4.0.2",
"readline-sync": "^1.4.10",
"replace": "^1.2.1",
"require-turbo": "workspace:*",
"rimraf": "^3.0.2",
"rtlcss": "^2.6.2",
"sass": "^1.49.9",

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -18,6 +18,7 @@
"@wordpress/env": "^4.8.0",
"@wordpress/scripts": "^19.2.4",
"eslint": "5.16.0",
"require-turbo": "workspace:*",
"uglify-js": "^3.5.3"
},
"dependencies": {
@ -40,7 +41,7 @@
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"build": "pnpm run build:admin && pnpm run uglify",
"build": "node ./node_modules/require-turbo && pnpm run build:admin && pnpm run uglify",
"build:admin": "wp-scripts build",
"build:zip": "./bin/build-zip.sh",
"build:dev": "pnpm run lint:js && pnpm run build",

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: This PR updates repository tooling and doesn't require a changelog entry.

View File

@ -6,8 +6,8 @@
"private": true,
"main": "Gruntfile.js",
"scripts": {
"build": "grunt assets",
"lint": "grunt eslint stylelint --force"
"build": "node ./node_modules/require-turbo && grunt assets",
"lint": "node ./node_modules/require-turbo && grunt eslint stylelint --force"
},
"devDependencies": {
"@wordpress/stylelint-config": "19.1.0",
@ -29,6 +29,7 @@
"grunt-sass": "3.1.0",
"grunt-stylelint": "0.16.0",
"gruntify-eslint": "5.0.0",
"require-turbo": "workspace:*",
"sass": "^1.45.0",
"stylelint": "13.8.0"
}

View File

@ -16,10 +16,10 @@
"preinstall": "npx only-allow pnpm",
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"build": "WC_ADMIN_PHASE=core pnpm run build:feature-config",
"build": "node ./node_modules/require-turbo && WC_ADMIN_PHASE=core pnpm run build:feature-config",
"build:feature-config": "php bin/generate-feature-config.php",
"build:zip": "./bin/build-zip.sh",
"lint": "pnpm lint:js && pnpm lint:php",
"lint": "node ./node_modules/require-turbo && pnpm lint:js && pnpm lint:php",
"lint:fix": "pnpm lint:js:fix && pnpm lint:php:fix",
"lint:js": "eslint assets/js --ext=js",
"lint:js:fix": "eslint assets/js --ext=js --fix",
@ -33,7 +33,7 @@
"e2e": "pnpm exec wc-e2e test:e2e",
"e2e:debug": "pnpm exec wc-e2e test:e2e-debug",
"e2e:dev": "pnpm exec wc-e2e test:e2e-dev",
"test": "pnpm test:unit",
"test": "node ./node_modules/require-turbo && pnpm test:unit",
"test:unit": "./vendor/bin/phpunit -c ./phpunit.xml",
"makepot": "composer run-script makepot",
"packages:fix:textdomain": "node ./bin/package-update-textdomain.js"
@ -75,6 +75,7 @@
"jest": "^25.1.0",
"mocha": "7.2.0",
"prettier": "npm:wp-prettier@2.0.5",
"require-turbo": "workspace:*",
"stylelint": "^13.8.0",
"typescript": "3.9.7",
"webpack": "5.70.0",

View File

@ -124,6 +124,7 @@ importers:
jest: ^27.5.1
jest-cli: ^27.5.1
jest-mock-extended: ^1.0.18
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -142,6 +143,7 @@ importers:
jest: 27.5.1
jest-cli: 27.5.1
jest-mock-extended: 1.0.18_jest@27.5.1+typescript@4.6.2
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_23bc83dd0471d6d2a42908007c85fd69
typescript: 4.6.2
@ -159,6 +161,7 @@ importers:
eslint: ^8.2.0
jest: ^25
oauth-1.0a: 2.2.6
require-turbo: workspace:*
ts-jest: ^25
typescript: ^4.4.4
dependencies:
@ -174,6 +177,7 @@ importers:
axios-mock-adapter: 1.20.0_axios@0.24.0
eslint: 8.2.0
jest: 25.5.4
require-turbo: link:../../../tools/require-turbo
ts-jest: 25.5.1_jest@25.5.4+typescript@4.4.4
typescript: 4.4.4
@ -187,6 +191,7 @@ importers:
jest-allure: ^0.1.3
jest-runner-groups: ^2.1.0
postman-collection: ^4.1.0
require-turbo: workspace:*
supertest: ^6.1.4
dependencies:
allure-commandline: 2.17.2
@ -199,6 +204,7 @@ importers:
devDependencies:
'@woocommerce/eslint-plugin': link:../eslint-plugin
eslint: 8.12.0
require-turbo: link:../../../tools/require-turbo
packages/js/components:
specifiers:
@ -271,6 +277,7 @@ importers:
prop-types: ^15.8.1
react-dates: ^21.8.0
react-transition-group: ^4.4.2
require-turbo: workspace:*
rimraf: ^3.0.2
sass-loader: ^10.2.1
ts-jest: ^27.1.3
@ -348,6 +355,7 @@ importers:
jest: 27.5.1
jest-cli: 27.5.1
postcss-loader: 3.0.0
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
sass-loader: 10.2.1_sass@1.49.9+webpack@5.70.0
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
@ -364,6 +372,7 @@ importers:
jest: ^27.5.1
jest-cli: ^27.5.1
moment: ^2.29.1
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -376,6 +385,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -392,6 +402,7 @@ importers:
eslint: ^8.12.0
jest: ^27.5.1
jest-cli: ^27.5.1
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -407,6 +418,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -436,6 +448,7 @@ importers:
postcss-loader: ^3.0.0
prop-types: ^15.8.1
react-transition-group: ^4.4.2
require-turbo: workspace:*
rimraf: ^3.0.2
sass-loader: ^10.2.1
ts-jest: ^27.1.3
@ -467,6 +480,7 @@ importers:
jest: 27.5.1
jest-cli: 27.5.1
postcss-loader: 3.0.0
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
sass-loader: 10.2.1_sass@1.49.9+webpack@5.70.0
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
@ -507,6 +521,7 @@ importers:
qs: ^6.10.3
redux: ^4.1.0
rememo: ^4.0.0
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -543,6 +558,7 @@ importers:
jest: 27.5.1
jest-cli: 27.5.1
redux: 4.1.2
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -561,6 +577,7 @@ importers:
moment: ^2.29.1
moment-timezone: ^0.5.34
qs: ^6.10.3
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -578,6 +595,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -590,6 +608,7 @@ importers:
eslint: ^8.12.0
jest: ^27.5.1
jest-cli: ^27.5.1
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -603,6 +622,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -776,6 +796,7 @@ importers:
eslint-plugin-testing-library: ^5.1.0
jest: ^27.5.1
jest-cli: ^27.5.1
require-turbo: workspace:*
requireindex: ^1.2.0
rimraf: ^3.0.2
ts-jest: ^27.1.3
@ -791,6 +812,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -828,6 +850,7 @@ importers:
postcss-loader: ^3.0.0
react-transition-group: ^4.4.2
react-visibility-sensor: ^5.1.1
require-turbo: workspace:*
rimraf: ^3.0.2
sass-loader: ^10.2.1
ts-jest: ^27.1.3
@ -867,6 +890,7 @@ importers:
jest: 27.5.1
jest-cli: 27.5.1
postcss-loader: 3.0.0
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
sass-loader: 10.2.1_sass@1.49.9+webpack@5.70.0
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
@ -890,6 +914,7 @@ importers:
jest: ^27.5.1
jest-cli: ^27.5.1
qs: ^6.10.3
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -909,6 +934,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -925,6 +951,7 @@ importers:
glob: ^7.2.0
lodash: ^4.17.21
mkdirp: ^1.0.4
require-turbo: workspace:*
devDependencies:
'@babel/core': 7.12.9
'@woocommerce/eslint-plugin': link:../eslint-plugin
@ -933,6 +960,7 @@ importers:
glob: 7.2.0
lodash: 4.17.21
mkdirp: 1.0.4
require-turbo: link:../../../tools/require-turbo
packages/js/internal-js-tests:
specifiers:
@ -947,6 +975,7 @@ importers:
jest: ^27.5.1
jest-cli: ^27.5.1
regenerator-runtime: ^0.13.9
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -963,6 +992,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -980,6 +1010,7 @@ importers:
jest-cli: ^27.5.1
mini-css-extract-plugin: ^2.6.0
postcss-loader: ^3.0.0
require-turbo: workspace:*
rimraf: ^3.0.2
sass-loader: ^10.2.1
ts-jest: ^27.1.3
@ -1003,6 +1034,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -1025,6 +1057,7 @@ importers:
jest: ^27.5.1
jest-cli: ^27.5.1
qs: ^6.10.3
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -1045,6 +1078,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -1061,6 +1095,7 @@ importers:
jest: ^27.5.1
jest-cli: ^27.5.1
redux: ^4.2.0
require-turbo: workspace*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -1076,6 +1111,7 @@ importers:
jest: 27.5.1
jest-cli: 27.5.1
redux: 4.2.0
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -1089,6 +1125,7 @@ importers:
jest: ^27.5.1
jest-cli: ^27.5.1
locutus: ^2.0.16
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -1101,6 +1138,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -1127,6 +1165,7 @@ importers:
jest: ^27.5.1
jest-cli: ^27.5.1
postcss-loader: ^3.0.0
require-turbo: workspace:*
rimraf: ^3.0.2
sass-loader: ^10.2.1
ts-jest: ^27.1.3
@ -1155,6 +1194,7 @@ importers:
jest: 27.5.1
jest-cli: 27.5.1
postcss-loader: 3.0.0
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
sass-loader: 10.2.1_sass@1.49.9+webpack@5.70.0
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
@ -1171,6 +1211,7 @@ importers:
eslint: ^8.12.0
jest: ^27.5.1
jest-cli: ^27.5.1
require-turbo: workspace:*
rimraf: ^3.0.2
ts-jest: ^27.1.3
typescript: ^4.6.2
@ -1183,6 +1224,7 @@ importers:
eslint: 8.12.0
jest: 27.5.1
jest-cli: 27.5.1
require-turbo: link:../../../tools/require-turbo
rimraf: 3.0.2
ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd
typescript: 4.6.2
@ -1225,6 +1267,7 @@ importers:
jest: ^25.1.0
mocha: 7.2.0
prettier: npm:wp-prettier@2.0.5
require-turbo: workspace:*
stylelint: ^13.8.0
typescript: 3.9.7
webpack: 5.70.0
@ -1267,6 +1310,7 @@ importers:
jest: 25.5.4
mocha: 7.2.0
prettier: /wp-prettier/2.0.5
require-turbo: link:../../tools/require-turbo
stylelint: 13.13.1
typescript: 3.9.7
webpack: 5.70.0_webpack-cli@3.3.12
@ -1423,6 +1467,7 @@ importers:
readline-sync: ^1.4.10
redux: ^4.1.2
replace: ^1.2.1
require-turbo: workspace:*
rimraf: ^3.0.2
rtlcss: ^2.6.2
sass: ^1.49.9
@ -1588,6 +1633,7 @@ importers:
raw-loader: 4.0.2_webpack@5.70.0
readline-sync: 1.4.10
replace: 1.2.1
require-turbo: link:../../tools/require-turbo
rimraf: 3.0.2
rtlcss: 2.6.2
sass: 1.49.9
@ -1620,6 +1666,7 @@ importers:
'@wordpress/hooks': ^2.11.1
'@wordpress/scripts': ^19.2.4
eslint: 5.16.0
require-turbo: workspace:*
uglify-js: ^3.5.3
dependencies:
'@types/prop-types': 15.7.4
@ -1637,6 +1684,7 @@ importers:
'@wordpress/env': 4.8.0
'@wordpress/scripts': 19.2.4_ee910045e4cc2812de8b965e303c7169
eslint: 5.16.0
require-turbo: link:../../tools/require-turbo
uglify-js: 3.14.5
plugins/woocommerce/client/legacy:
@ -1660,6 +1708,7 @@ importers:
grunt-sass: 3.1.0
grunt-stylelint: 0.16.0
gruntify-eslint: 5.0.0
require-turbo: workspace:*
sass: ^1.45.0
stylelint: 13.8.0
devDependencies:
@ -1682,6 +1731,7 @@ importers:
grunt-sass: 3.1.0_grunt@1.3.0
grunt-stylelint: 0.16.0_stylelint@13.8.0
gruntify-eslint: 5.0.0_grunt@1.3.0
require-turbo: link:../../../../tools/require-turbo
sass: 1.49.9
stylelint: 13.8.0
@ -1780,6 +1830,9 @@ importers:
tslib: 2.3.1
typescript: 4.6.2
tools/require-turbo:
specifiers: {}
packages:
/@ampproject/remapping/2.1.2:
@ -12749,7 +12802,6 @@ packages:
re-resizable: 4.11.0
transitivePeerDependencies:
- react
- react-dom
dev: true
/@types/wordpress__compose/4.0.1:
@ -16811,7 +16863,7 @@ packages:
dev: true
/ansicolors/0.3.2:
resolution: {integrity: sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=}
resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==}
/ansis/1.3.4:
resolution: {integrity: sha512-BDXljGSG4gZXmWK64bQzXkI509i5fe8aAa9+eL29e3swaWUqxvxk/XlONjw9AUrNCpQWNdy++0GX7HAhWeR9BQ==}
@ -17092,7 +17144,7 @@ packages:
resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==}
/async/0.9.2:
resolution: {integrity: sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=}
resolution: {integrity: sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==}
/async/1.5.2:
resolution: {integrity: sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==}
@ -18726,7 +18778,7 @@ packages:
dev: true
/cardinal/2.1.1:
resolution: {integrity: sha1-fMEFXYItISlU0HsIXeolHMe8VQU=}
resolution: {integrity: sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==}
hasBin: true
dependencies:
ansicolors: 0.3.2
@ -31631,7 +31683,7 @@ packages:
dev: true
/path-key/2.0.1:
resolution: {integrity: sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=}
resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==}
engines: {node: '>=4'}
/path-key/3.1.1:
@ -34280,7 +34332,7 @@ packages:
strip-indent: 3.0.0
/redeyed/2.1.1:
resolution: {integrity: sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=}
resolution: {integrity: sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==}
dependencies:
esprima: 4.0.1
@ -35239,7 +35291,7 @@ packages:
dev: true
/shebang-command/1.2.0:
resolution: {integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=}
resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==}
engines: {node: '>=0.10.0'}
dependencies:
shebang-regex: 1.0.0
@ -35251,7 +35303,7 @@ packages:
shebang-regex: 3.0.0
/shebang-regex/1.0.0:
resolution: {integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=}
resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==}
engines: {node: '>=0.10.0'}
/shebang-regex/3.0.0:

View File

@ -6,3 +6,4 @@ packages:
- 'tools/code-analyzer'
- 'tools/create-extension'
- 'tools/package-release'
- 'tools/require-turbo'

View File

@ -0,0 +1,8 @@
# Require Turbo
A simple helper tool for checking that a script is being run via Turborepo.
### Usage
Add this package to your dev dependencies (via `workspace:*`). Then, for any script that you want to ensure is executed via Turborepo, add the following to the start: `node ./node_modules/require-turbo && `

View File

@ -0,0 +1,8 @@
if ( ! process.env.TURBO_HASH ) {
console.error( 'This project uses Turborepo. You should not run this script from the project directly.' );
if ( process.env.npm_lifecycle_event && process.env.npm_package_name ) {
console.error( "\nTry running the following from the root of the monorepo instead:" );
console.error( "pnpm -- turbo run %s --filter=%s\n", process.env.npm_lifecycle_event, process.env.npm_package_name );
}
process.exit( 1 );
}

View File

@ -0,0 +1,11 @@
{
"name": "require-turbo",
"version": "0.0.0",
"description": "A tool for checking that package scripts are run through Turborepo",
"main": "index.js",
"author": "Automattic",
"license": "GPL-2.0-only",
"engines": {
"node": "^16.13.1"
}
}