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

[infra] Replace lerna run with top-level wireit scripts #3098

Merged
merged 19 commits into from Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/twenty-wasps-agree.md
@@ -0,0 +1,2 @@
---
---
5 changes: 1 addition & 4 deletions .github/workflows/tests.yml
Expand Up @@ -89,10 +89,7 @@ jobs:
- name: Lerna bootstrap
run: npm run bootstrap

- name: Build
run: npm run build -- --scope @lit-labs/analyzer --scope @lit-labs/gen-utils --scope @lit-labs/gen-wrapper-angular --scope @lit-labs/gen-wrapper-vue --scope @lit-labs/gen-wrapper-react --scope @lit-labs/cli

- name: Test
env:
RUN_BROWSER_TESTS: false
run: npm run test -- --scope @lit-labs/analyzer --scope @lit-labs/gen-utils --scope @lit-labs/gen-wrapper-angular --scope @lit-labs/gen-wrapper-vue --scope @lit-labs/gen-wrapper-react --scope @lit-labs/cli
run: npm run test:windows
892 changes: 460 additions & 432 deletions package-lock.json

Large diffs are not rendered by default.

132 changes: 128 additions & 4 deletions package.json
Expand Up @@ -9,23 +9,147 @@
"scripts": {
"benchmarks": "cd packages/benchmarks && npm run benchmarks",
"bootstrap": "lerna bootstrap --ci --ignore @lit/lit-starter-* && lerna bootstrap --ci --scope @lit/lit-starter-* --concurrency=1",
"build": "lerna run build",
"build:ts": "lerna run build:ts",
"clean": "lerna run clean",
"build": "wireit",
"build:ts": "wireit",
"build:lit-starter-ts": "wireit",
"format": "npm run format:eslint && npm run format:prettier",
"format:eslint": "eslint \"**/*.{js,ts}\" --fix",
"format:prettier": "prettier \"**/*.{cjs,html,js,json,md,ts}\" --write",
"ignore-sync": "ignore-sync .",
"lint": "eslint \"**/*.{js,ts}\"",
"nuke": "rm -rf node_modules && npm install && lerna exec 'rm -rf node_modules' && lerna bootstrap && npm run clean",
"upgrade": "rm -rf node_modules package-lock.json && npm install && lerna exec 'rm -rf node_modules package-lock.json' && lerna bootstrap && npm run clean",
"test": "lerna run test --ignore '{lit,lit-html,lit-element,@lit/reactive-element,@lit-labs/context,@lit-labs/motion,@lit-labs/observers,@lit-labs/react,@lit-labs/router,@lit-labs/scoped-registry-mixin,@lit-labs/task}' --concurrency 1 --stream ",
"test": "wireit",
"test:lit-starter-js": "wireit",
"test:lit-starter-ts": "wireit",
"test:windows": "wireit",
"prepare": "husky install",
"changeset": "changeset",
"version": "npm run changeset version && npm run update-version-vars && lerna bootstrap -- --package-lock-only",
"update-version-vars": "node scripts/update-version-variables.js",
"release": "npm run bootstrap && npm run build && npm run changeset publish"
},
"wireit": {
"build": {
"dependencies": [
"./packages/benchmarks:build",
"./packages/internal-scripts:build",
"./packages/lit:build",
"./packages/lit-element:build",
"./packages/lit-html:build",
"./packages/lit-starter-js:build",
"build:lit-starter-ts",
"./packages/localize:build",
"./packages/localize-tools:build",
"./packages/reactive-element:build",
"./packages/tests:build",
"./packages/ts-transformers:build",
"./packages/labs/analyzer:build",
"./packages/labs/cli:build",
"./packages/labs/context:build",
"./packages/labs/eleventy-plugin-lit:build",
"./packages/labs/gen-utils:build",
"./packages/labs/gen-wrapper-angular:build",
"./packages/labs/gen-wrapper-react:build",
"./packages/labs/gen-wrapper-vue:build",
"./packages/labs/motion:build",
"./packages/labs/observers:build",
"./packages/labs/react:build",
"./packages/labs/router:build",
"./packages/labs/scoped-registry-mixin:build",
"./packages/labs/ssr:build",
"./packages/labs/ssr-client:build",
"./packages/labs/task:build",
"./packages/labs/testing:build",
"./packages/labs/virtualizer:build",
"./packages/labs/vue-utils:build",
"./packages/labs/test-projects/test-element-a:build",
"./packages/localize/examples/runtime-js:build",
"./packages/localize/examples/runtime-ts:build",
"./packages/localize/examples/transform-js:build",
"./packages/localize/examples/transform-ts:build"
]
},
"build:ts": {
"dependencies": [
"./packages/internal-scripts:build:ts",
"./packages/lit:build:ts",
"./packages/lit-element:build:ts",
"./packages/lit-html:build:ts",
"./packages/localize:build:ts",
"./packages/localize-tools:build:ts",
"./packages/reactive-element:build:ts",
"./packages/ts-transformers:build:ts",
"./packages/labs/context:build:ts",
"./packages/labs/eleventy-plugin-lit:build:ts",
"./packages/labs/motion:build:ts",
"./packages/labs/observers:build:ts",
"./packages/labs/react:build:ts",
"./packages/labs/router:build:ts",
"./packages/labs/scoped-registry-mixin:build:ts",
"./packages/labs/ssr:build:ts",
"./packages/labs/ssr-client:build:ts",
"./packages/labs/task:build:ts",
"./packages/labs/testing:build:ts",
"./packages/labs/virtualizer:build:ts",
"./packages/labs/vue-utils:build:ts"
]
},
"build:lit-starter-ts": {
"#comment": [
"The starter kits are special because they're templates for other",
"repos, so we don't want it to use wireit directly. Instead, this",
"hack integrates it into the overall build with correct ordering."
],
"command": "cd packages/lit-starter-ts && npm run build",
"dependencies": [
"./packages/lit:build:ts:types"
]
},
"test": {
"dependencies": [
"test:lit-starter-js",
"test:lit-starter-ts",
"./packages/localize:test",
"./packages/localize-tools:test",
"./packages/tests:test",
"./packages/ts-transformers:test",
"./packages/labs/analyzer:test",
"./packages/labs/cli:test",
"./packages/labs/eleventy-plugin-lit:test",
"./packages/labs/gen-utils:test",
"./packages/labs/gen-wrapper-angular:test",
"./packages/labs/gen-wrapper-react:test",
"./packages/labs/gen-wrapper-vue:test",
"./packages/labs/ssr:test",
"./packages/labs/testing:test",
"./packages/labs/virtualizer:test"
]
},
"test:lit-starter-js": {
"command": "cd packages/lit-starter-js && npm test",
"dependencies": [
"./packages/lit:build"
]
},
"test:lit-starter-ts": {
"command": "cd packages/lit-starter-ts && npm test",
"dependencies": [
"build:lit-starter-ts",
"./packages/lit:build"
]
},
"test:windows": {
"dependencies": [
"./packages/labs/analyzer:test",
"./packages/labs/cli:test",
"./packages/labs/gen-utils:test",
"./packages/labs/gen-wrapper-angular:test",
"./packages/labs/gen-wrapper-react:test",
"./packages/labs/gen-wrapper-vue:test"
]
}
},
"devDependencies": {
"@babel/eslint-parser": "^7.17.0",
"@changesets/cli": "^2.16.0",
Expand Down
11 changes: 8 additions & 3 deletions packages/labs/testing/package.json
Expand Up @@ -23,14 +23,17 @@
"wireit": {
"build": {
"dependencies": [
"build:ts"
"build:ts",
"../../lit:build",
"../ssr-client:build"
]
},
"build:ts": {
"command": "tsc --build --pretty",
"clean": "if-file-deleted",
"dependencies": [
"../../lit:build:ts:types"
"../../lit:build:ts:types",
"../ssr:build:ts"
],
"files": [
"src/**/*.ts",
Expand All @@ -50,7 +53,9 @@
"dependencies": [
"build"
],
"files": [],
"files": [
"web-test-runner.config.js"
],
"output": []
}
},
Expand Down
1 change: 0 additions & 1 deletion packages/labs/virtualizer/package.json
Expand Up @@ -66,7 +66,6 @@
".tsbuildinfo",
"layouts/**/*.{js,d.ts,d.ts.map}",
"polyfillLoaders/**/*.{js,d.ts,d.ts.map}",
"polyfills/**/*.{js,d.ts,d.ts.map}",
"test/**/*.{js,d.ts,d.ts.map}",
"!test/screenshot/**",
"lit-virtualizer.{js,d.ts,d.ts.map}",
Expand Down
2 changes: 2 additions & 0 deletions packages/lit-html/rollup-version-stability-test.config.js
Expand Up @@ -10,4 +10,6 @@ export default defaultConfig({
outputDir: './version-stability-build/',
testPropertyPrefix: 'VERSION_TEST_',
copyHtmlTests: false,
// Don't emit polyfill-support.js from this test
bundled: [],
});
2 changes: 1 addition & 1 deletion packages/tests/src/web-test-runner.config.ts
Expand Up @@ -226,7 +226,7 @@ const config: TestRunnerConfig = {
// enough so that blocked tests have time to wait for all previous test files
// to run to completion.
testsStartTimeout: 60000 * 10, // default 120000
testsFinishTimeout: 120000, // default 20000
testsFinishTimeout: 600000, // default 20000
testFramework: {
// https://mochajs.org/api/mocha
config: {
Expand Down