dev: swap yarn test and test-dev for better dx (#2773)
As discussed offline, just making `yarn test` do what we expect it to. ### Change Type - [x] `internal` — Any other changes that don't affect the published package[^2]
This commit is contained in:
parent
7caaa2fbbb
commit
2ad47958bb
16 changed files with 29 additions and 29 deletions
2
.github/workflows/checks.yml
vendored
2
.github/workflows/checks.yml
vendored
|
@ -51,7 +51,7 @@ jobs:
|
||||||
run: yarn api-check
|
run: yarn api-check
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn test
|
run: yarn test-ci
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: 'Build all projects'
|
name: 'Build all projects'
|
||||||
|
|
|
@ -16,7 +16,7 @@ To create a pull request:
|
||||||
2. [Create a separate branch](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-branches) for your changes
|
2. [Create a separate branch](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-branches) for your changes
|
||||||
3. Make your changes, and ensure that it is formatted by [Prettier](https://prettier.io) and type-checks without errors in [TypeScript](https://www.typescriptlang.org/)
|
3. Make your changes, and ensure that it is formatted by [Prettier](https://prettier.io) and type-checks without errors in [TypeScript](https://www.typescriptlang.org/)
|
||||||
4. Write tests that validate your change and/or fix.
|
4. Write tests that validate your change and/or fix.
|
||||||
5. Run `yarn build` and then run tests with `yarn test`.
|
5. Run `yarn build` and then run tests with `yarn test-ci`.
|
||||||
6. Push your branch and open a PR. 🚀
|
6. Push your branch and open a PR. 🚀
|
||||||
|
|
||||||
Before your code is merged, you will need to sign our [contributor license agreement](https://github.com/tldraw/tldraw/blob/main/CLA.md), which is handled automatically via GitHub comments. Your PR will be reviewed and merged in within a day or two if everything looks good.
|
Before your code is merged, you will need to sign our [contributor license agreement](https://github.com/tldraw/tldraw/blob/main/CLA.md), which is handled automatically via GitHub comments. Your PR will be reviewed and merged in within a day or two if everything looks good.
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env NODE_ENV=development wrangler dev --log-level info --persist-to tmp-assets",
|
"dev": "cross-env NODE_ENV=development wrangler dev --log-level info --persist-to tmp-assets",
|
||||||
"test": "lazy inherit --passWithNoTests",
|
"test-ci": "lazy inherit --passWithNoTests",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy inherit --passWithNoTests",
|
"test-coverage": "lazy inherit --passWithNoTests",
|
||||||
"lint": "yarn run -T tsx ../../scripts/lint.ts"
|
"lint": "yarn run -T tsx ../../scripts/lint.ts"
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
"dev-cron": "yarn run -T tsx ./scripts/cron.ts",
|
"dev-cron": "yarn run -T tsx ./scripts/cron.ts",
|
||||||
"dev-wrangler": "yarn run -T tsx ./scripts/dev-wrap.ts",
|
"dev-wrangler": "yarn run -T tsx ./scripts/dev-wrap.ts",
|
||||||
"report-size": "node scripts/report-size.js",
|
"report-size": "node scripts/report-size.js",
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy inherit",
|
"test-coverage": "lazy inherit",
|
||||||
"lint": "yarn run -T tsx ../../scripts/lint.ts"
|
"lint": "yarn run -T tsx ../../scripts/lint.ts"
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
"build": "yarn run -T tsx scripts/build.ts",
|
"build": "yarn run -T tsx scripts/build.ts",
|
||||||
"start": "VITE_PREVIEW=1 yarn run -T tsx scripts/dev-app.ts",
|
"start": "VITE_PREVIEW=1 yarn run -T tsx scripts/dev-app.ts",
|
||||||
"lint": "yarn run -T tsx ../../scripts/lint.ts",
|
"lint": "yarn run -T tsx ../../scripts/lint.ts",
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch"
|
"test": "yarn run -T jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@radix-ui/react-popover": "^1.0.7",
|
"@radix-ui/react-popover": "^1.0.7",
|
||||||
|
|
|
@ -53,7 +53,7 @@ const config = {
|
||||||
'apps/vscode/*': { runsAfter: { build: { in: 'self-only' } } },
|
'apps/vscode/*': { runsAfter: { build: { in: 'self-only' } } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
test: {
|
'test-ci': {
|
||||||
baseCommand: 'yarn run -T jest',
|
baseCommand: 'yarn run -T jest',
|
||||||
runsAfter: { 'refresh-assets': {} },
|
runsAfter: { 'refresh-assets': {} },
|
||||||
cache: {
|
cache: {
|
||||||
|
|
|
@ -54,8 +54,8 @@
|
||||||
"typecheck": "yarn refresh-assets && tsx scripts/typecheck.ts",
|
"typecheck": "yarn refresh-assets && tsx scripts/typecheck.ts",
|
||||||
"check-scripts": "tsx scripts/check-scripts.ts",
|
"check-scripts": "tsx scripts/check-scripts.ts",
|
||||||
"api-check": "lazy api-check",
|
"api-check": "lazy api-check",
|
||||||
"test": "lazy test",
|
"test-ci": "lazy test-ci",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy test-coverage && node scripts/offer-coverage.mjs",
|
"test-coverage": "lazy test-coverage && node scripts/offer-coverage.mjs",
|
||||||
"e2e": "lazy e2e --filter='apps/examples'"
|
"e2e": "lazy e2e --filter='apps/examples'"
|
||||||
},
|
},
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
"editor.css"
|
"editor.css"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"benchmark": "yarn run -T tsx ./scripts/benchmark.ts",
|
"benchmark": "yarn run -T tsx ./scripts/benchmark.ts",
|
||||||
"test-coverage": "lazy inherit",
|
"test-coverage": "lazy inherit",
|
||||||
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
||||||
"files": [],
|
"files": [],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy inherit",
|
"test-coverage": "lazy inherit",
|
||||||
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
||||||
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",
|
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
||||||
"files": [],
|
"files": [],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy inherit",
|
"test-coverage": "lazy inherit",
|
||||||
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
||||||
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",
|
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
"types": "./.tsbuild/index.d.ts",
|
"types": "./.tsbuild/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy inherit",
|
"test-coverage": "lazy inherit",
|
||||||
"predev": "node ./scripts/copy-css-files.mjs",
|
"predev": "node ./scripts/copy-css-files.mjs",
|
||||||
"dev": "chokidar '../{editor/editor,tldraw/src/lib/ui}.css' -c 'node ./scripts/copy-css-files.mjs'",
|
"dev": "chokidar '../{editor/editor,tldraw/src/lib/ui}.css' -c 'node ./scripts/copy-css-files.mjs'",
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
||||||
"files": [],
|
"files": [],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy inherit",
|
"test-coverage": "lazy inherit",
|
||||||
"index": "node ./scripts/build-index.js && yarn format",
|
"index": "node ./scripts/build-index.js && yarn format",
|
||||||
"format": "yarn run -T prettier --write --cache \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
|
"format": "yarn run -T prettier --write --cache \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
||||||
"files": [],
|
"files": [],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy inherit",
|
"test-coverage": "lazy inherit",
|
||||||
"lint": "yarn run -T tsx ../../scripts/lint.ts"
|
"lint": "yarn run -T tsx ../../scripts/lint.ts"
|
||||||
},
|
},
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
||||||
"files": [],
|
"files": [],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy inherit",
|
"test-coverage": "lazy inherit",
|
||||||
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
||||||
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",
|
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
|
||||||
"files": [],
|
"files": [],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "lazy inherit",
|
"test-ci": "lazy inherit",
|
||||||
"test-dev": "yarn run -T jest --watch",
|
"test": "yarn run -T jest",
|
||||||
"test-coverage": "lazy inherit",
|
"test-coverage": "lazy inherit",
|
||||||
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
"build": "yarn run -T tsx ../../scripts/build-package.ts",
|
||||||
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",
|
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",
|
||||||
|
|
|
@ -20,7 +20,7 @@ const expectedScripts = {
|
||||||
// packages (in packages/) should have these scripts
|
// packages (in packages/) should have these scripts
|
||||||
const expectedPackageScripts = {
|
const expectedPackageScripts = {
|
||||||
...expectedScripts,
|
...expectedScripts,
|
||||||
test: () => 'lazy inherit',
|
'test-ci': () => 'lazy inherit',
|
||||||
}
|
}
|
||||||
|
|
||||||
// published packages should have these scripts
|
// published packages should have these scripts
|
||||||
|
@ -45,7 +45,7 @@ const perPackageExceptions: Record<string, Record<string, () => string | undefin
|
||||||
lint: () => 'lazy lint',
|
lint: () => 'lazy lint',
|
||||||
},
|
},
|
||||||
'@tldraw/assets': {
|
'@tldraw/assets': {
|
||||||
test: () => undefined,
|
'test-ci': () => undefined,
|
||||||
build: () => undefined,
|
build: () => undefined,
|
||||||
'build-api': () => undefined,
|
'build-api': () => undefined,
|
||||||
prepack: () => undefined,
|
prepack: () => undefined,
|
||||||
|
|
Loading…
Reference in a new issue