2022-05-25 23:05:03 +03:00
|
|
|
// @ts-check
|
2022-09-05 01:55:42 +03:00
|
|
|
const path = require("path");
|
2022-10-27 03:34:19 +03:00
|
|
|
const fastGlob = require("fast-glob");
|
2022-05-25 23:05:03 +03:00
|
|
|
|
2023-05-09 00:53:34 +03:00
|
|
|
/** @type {import("lage").ConfigOptions} */
|
2022-05-25 23:05:03 +03:00
|
|
|
module.exports = {
|
|
|
|
pipeline: {
|
2023-02-08 02:49:19 +03:00
|
|
|
"lage#bundle": ["^^transpile", "types"],
|
2022-11-05 04:02:31 +03:00
|
|
|
types: {
|
|
|
|
type: "worker",
|
|
|
|
options: {
|
|
|
|
worker: path.join(__dirname, "scripts/worker/types.js"),
|
|
|
|
},
|
|
|
|
dependsOn: ["^types"],
|
2023-02-08 02:49:19 +03:00
|
|
|
outputs: ["lib/**/*.d.ts"],
|
2022-11-05 04:02:31 +03:00
|
|
|
},
|
2023-05-09 00:53:34 +03:00
|
|
|
isolatedTypes: {
|
|
|
|
type: "worker",
|
|
|
|
options: {
|
|
|
|
worker: path.join(__dirname, "scripts/worker/types.js"),
|
|
|
|
},
|
|
|
|
dependsOn: [],
|
|
|
|
outputs: ["lib/**/*.d.ts"],
|
|
|
|
},
|
2022-11-05 04:02:31 +03:00
|
|
|
transpile: {
|
|
|
|
type: "worker",
|
|
|
|
options: {
|
|
|
|
worker: path.join(__dirname, "scripts/worker/transpile.js"),
|
2022-12-06 03:41:41 +03:00
|
|
|
},
|
2023-02-08 02:49:19 +03:00
|
|
|
outputs: ["lib/**/*.js"],
|
2022-11-05 04:02:31 +03:00
|
|
|
},
|
2022-10-27 03:34:19 +03:00
|
|
|
test: {
|
|
|
|
type: "worker",
|
|
|
|
weight: (target) => {
|
|
|
|
return fastGlob.sync("tests/**/*.test.ts", { cwd: target.cwd }).length;
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
worker: path.join(__dirname, "scripts/worker/jest.js"),
|
|
|
|
},
|
|
|
|
dependsOn: ["build"],
|
|
|
|
},
|
2024-06-25 21:08:16 +03:00
|
|
|
build: {
|
|
|
|
type: "noop",
|
|
|
|
dependsOn: ["transpile", "types"],
|
|
|
|
},
|
2024-09-27 23:00:24 +03:00
|
|
|
"@lage-run/globby#types": {
|
2024-06-25 21:08:16 +03:00
|
|
|
type: "npmScript",
|
|
|
|
},
|
|
|
|
"@lage-run/globby#transpile": {
|
2024-09-27 23:00:24 +03:00
|
|
|
type: "npmScript",
|
|
|
|
},
|
|
|
|
"@lage-run/globby#isoldatedTypes": {
|
|
|
|
type: "npmScript",
|
|
|
|
options: {
|
|
|
|
script: "types",
|
|
|
|
},
|
2024-06-25 21:08:16 +03:00
|
|
|
},
|
2022-09-05 01:55:42 +03:00
|
|
|
lint: {
|
|
|
|
type: "worker",
|
|
|
|
options: {
|
|
|
|
worker: path.join(__dirname, "scripts/worker/lint.js"),
|
|
|
|
},
|
|
|
|
},
|
2022-11-01 00:20:42 +03:00
|
|
|
depcheck: {
|
|
|
|
type: "worker",
|
|
|
|
options: {
|
|
|
|
worker: path.join(__dirname, "scripts/worker/depcheck.js"),
|
2022-11-02 09:21:57 +03:00
|
|
|
},
|
2022-11-01 00:20:42 +03:00
|
|
|
},
|
2022-10-27 03:34:19 +03:00
|
|
|
"@lage-run/e2e-tests#test": {
|
|
|
|
type: "npmScript",
|
2023-02-08 02:49:19 +03:00
|
|
|
dependsOn: ["^^transpile", "lage#bundle"],
|
2022-11-05 04:02:31 +03:00
|
|
|
},
|
2022-05-25 23:05:03 +03:00
|
|
|
},
|
2022-08-02 00:13:30 +03:00
|
|
|
npmClient: "yarn",
|
2022-10-27 03:34:19 +03:00
|
|
|
cacheOptions: {
|
2024-04-24 02:55:52 +03:00
|
|
|
// These are relative to the git root, and affect the hash of the cache.
|
|
|
|
// Changes to any of these files will invalidate the cache.
|
2023-02-08 02:49:19 +03:00
|
|
|
environmentGlob: [
|
2024-04-24 02:55:52 +03:00
|
|
|
// Folder globs MUST end with **/* to include all files!
|
|
|
|
"!node_modules/**/*",
|
|
|
|
"!**/node_modules/**/*",
|
|
|
|
".github/workflows/*",
|
2023-02-08 02:49:19 +03:00
|
|
|
"beachball.config.js",
|
|
|
|
"lage.config.js",
|
|
|
|
"package.json",
|
|
|
|
"packages/tsconfig.lage2.json",
|
2024-04-24 02:55:52 +03:00
|
|
|
"patches/**/*",
|
|
|
|
"yarn.lock",
|
2023-02-08 02:49:19 +03:00
|
|
|
],
|
2024-04-24 02:55:52 +03:00
|
|
|
// Subset of files in package directories that will be saved into the cache.
|
|
|
|
outputGlob: ["lib/**/*", "dist/**/*", ".docusaurus/**/*", "build/**/*"],
|
2022-10-27 03:34:19 +03:00
|
|
|
},
|
2022-08-02 00:13:30 +03:00
|
|
|
};
|