@open-pioneer/build-package-cli 3.2.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog @open-pioneer/build-package-cli
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 8e38b33: Switch this package from legacy `main` / `types` fields to the modern `exports` field in `package.json`
8
+
9
+ ### Minor Changes
10
+
11
+ - 14379bb: Copy the `publishConfig` field when generating the contents of the `package.json` in `dist`.
12
+
13
+ ### Patch Changes
14
+
15
+ - 8e38b33: Change build setup: now uses tsdown instead of esbuild.
16
+ - Updated dependencies [8e38b33]
17
+ - Updated dependencies [14379bb]
18
+ - Updated dependencies [8e38b33]
19
+ - @open-pioneer/build-package@5.0.0
20
+
3
21
  ## 3.2.2
4
22
 
5
23
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1,48 +1,47 @@
1
- // src/index.ts
1
+ #!/usr/bin/env node
2
2
  import { cwd, exit } from "node:process";
3
3
  import { build } from "@open-pioneer/build-package";
4
4
  import { Command } from "commander";
5
-
6
- // package.json
7
- var version = "3.2.2";
8
-
9
- // src/index.ts
10
- var program = new Command();
5
+ //#region package.json
6
+ var version = "4.0.0";
7
+ //#endregion
8
+ //#region src/index.ts
9
+ const program = new Command();
11
10
  program.name("build-pioneer-package").description("Builds an Open Pioneer Trails package for publishing.").option("-p, --package <path>", "package directory (defaults to current directory)").option("-r, --root <path>", "the root directory (optional, defaults to the workspace root)").option("-q, --silent", "disable logging").option("-d, --debug", "show exception stack traces").version(version);
12
11
  program.parse();
13
12
  async function main() {
14
- const chalk = (await import("chalk")).default;
15
- const opts = program.opts();
16
- const debug = opts.debug ?? false;
17
- const silent = opts.silent ?? false;
18
- const packagePath = opts.package ?? cwd();
19
- const rootDirectory = opts.root;
20
- try {
21
- await build({
22
- packageDirectory: packagePath,
23
- rootDirectory,
24
- logger: silent ? null : console
25
- });
26
- exit(0);
27
- } catch (e) {
28
- if (debug) {
29
- console.error(e);
30
- } else {
31
- let current = e;
32
- let prefix = "";
33
- while (current != null) {
34
- console.error(
35
- chalk.red(`${prefix}${current.message ?? String(current)}`)
36
- );
37
- current = current.cause;
38
- prefix = "Caused by: ";
39
- }
40
- }
41
- exit(1);
42
- }
13
+ const chalk = (await import("chalk")).default;
14
+ const opts = program.opts();
15
+ const debug = opts.debug ?? false;
16
+ const silent = opts.silent ?? false;
17
+ const packagePath = opts.package ?? cwd();
18
+ const rootDirectory = opts.root;
19
+ try {
20
+ await build({
21
+ packageDirectory: packagePath,
22
+ rootDirectory,
23
+ logger: silent ? null : console
24
+ });
25
+ exit(0);
26
+ } catch (e) {
27
+ if (debug) console.error(e);
28
+ else {
29
+ let current = e;
30
+ let prefix = "";
31
+ while (current != null) {
32
+ console.error(chalk.red(`${prefix}${current.message ?? String(current)}`));
33
+ current = current.cause;
34
+ prefix = "Caused by: ";
35
+ }
36
+ }
37
+ exit(1);
38
+ }
43
39
  }
44
40
  main().catch((e) => {
45
- console.error("Fatal error", e);
46
- exit(1);
41
+ console.error("Fatal error", e);
42
+ exit(1);
47
43
  });
48
- //# sourceMappingURL=index.js.map
44
+ //#endregion
45
+ export {};
46
+
47
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/index.ts", "../package.json"],
4
- "sourcesContent": ["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\n\nimport { cwd, exit } from \"node:process\";\nimport { build } from \"@open-pioneer/build-package\";\nimport { Command } from \"commander\";\nimport { version } from \"../package.json\";\n\nconst program = new Command();\nprogram\n .name(\"build-pioneer-package\")\n .description(\"Builds an Open Pioneer Trails package for publishing.\")\n .option(\"-p, --package <path>\", \"package directory (defaults to current directory)\")\n .option(\"-r, --root <path>\", \"the root directory (optional, defaults to the workspace root)\")\n .option(\"-q, --silent\", \"disable logging\")\n .option(\"-d, --debug\", \"show exception stack traces\")\n .version(version);\nprogram.parse();\n\nasync function main() {\n const chalk = (await import(\"chalk\")).default;\n const opts = program.opts();\n const debug = opts.debug ?? false;\n const silent = opts.silent ?? false;\n const packagePath = opts.package ?? cwd();\n const rootDirectory = opts.root;\n try {\n await build({\n packageDirectory: packagePath,\n rootDirectory,\n logger: silent ? null : console\n });\n exit(0);\n } catch (e) {\n if (debug) {\n console.error(e);\n } else {\n let current: unknown = e;\n let prefix = \"\";\n while (current != null) {\n console.error(\n chalk.red(`${prefix}${(current as Error).message ?? String(current)}`)\n );\n current = (current as Error).cause;\n prefix = \"Caused by: \";\n }\n }\n exit(1);\n }\n}\n\nmain().catch((e) => {\n console.error(\"Fatal error\", e);\n exit(1);\n});\n", "{\n \"name\": \"@open-pioneer/build-package-cli\",\n \"version\": \"3.2.2\",\n \"description\": \"Provides a CLI tool to compile Open Pioneer Trails packages.\",\n \"keywords\": [\n \"open-pioneer-trails\"\n ],\n \"homepage\": \"https://github.com/open-pioneer\",\n \"license\": \"Apache-2.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/open-pioneer/trails-build-tools.git\",\n \"directory\": \"packages/build-package-cli\"\n },\n \"bin\": {\n \"build-pioneer-package\": \"./dist/index.js\"\n },\n \"files\": [\n \"dist/**/*.js\",\n \"dist/**/*.js.map\",\n \"CHANGELOG.md\",\n \"README.md\",\n \"LICENSE\"\n ],\n \"type\": \"module\",\n \"scripts\": {\n \"clean\": \"rimraf dist\",\n \"build\": \"node build.mjs build\",\n \"build-dev\": \"node build.mjs buildDev\",\n \"dev\": \"node build.mjs watch\"\n },\n \"dependencies\": {\n \"@open-pioneer/build-package\": \"workspace:^\",\n \"chalk\": \"catalog:\",\n \"commander\": \"catalog:\"\n },\n \"devDependencies\": {\n \"build-tools\": \"workspace:*\"\n },\n \"engines\": {\n \"node\": \">= 20\"\n }\n}\n"],
5
- "mappings": ";AAGA,SAAS,KAAK,YAAY;AAC1B,SAAS,aAAa;AACtB,SAAS,eAAe;;;ACHpB,cAAW;;;ADMf,IAAM,UAAU,IAAI,QAAQ;AAC5B,QACK,KAAK,uBAAuB,EAC5B,YAAY,uDAAuD,EACnE,OAAO,wBAAwB,mDAAmD,EAClF,OAAO,qBAAqB,+DAA+D,EAC3F,OAAO,gBAAgB,iBAAiB,EACxC,OAAO,eAAe,6BAA6B,EACnD,QAAQ,OAAO;AACpB,QAAQ,MAAM;AAEd,eAAe,OAAO;AAClB,QAAM,SAAS,MAAM,OAAO,OAAO,GAAG;AACtC,QAAM,OAAO,QAAQ,KAAK;AAC1B,QAAM,QAAQ,KAAK,SAAS;AAC5B,QAAM,SAAS,KAAK,UAAU;AAC9B,QAAM,cAAc,KAAK,WAAW,IAAI;AACxC,QAAM,gBAAgB,KAAK;AAC3B,MAAI;AACA,UAAM,MAAM;AAAA,MACR,kBAAkB;AAAA,MAClB;AAAA,MACA,QAAQ,SAAS,OAAO;AAAA,IAC5B,CAAC;AACD,SAAK,CAAC;AAAA,EACV,SAAS,GAAG;AACR,QAAI,OAAO;AACP,cAAQ,MAAM,CAAC;AAAA,IACnB,OAAO;AACH,UAAI,UAAmB;AACvB,UAAI,SAAS;AACb,aAAO,WAAW,MAAM;AACpB,gBAAQ;AAAA,UACJ,MAAM,IAAI,GAAG,MAAM,GAAI,QAAkB,WAAW,OAAO,OAAO,CAAC,EAAE;AAAA,QACzE;AACA,kBAAW,QAAkB;AAC7B,iBAAS;AAAA,MACb;AAAA,IACJ;AACA,SAAK,CAAC;AAAA,EACV;AACJ;AAEA,KAAK,EAAE,MAAM,CAAC,MAAM;AAChB,UAAQ,MAAM,eAAe,CAAC;AAC9B,OAAK,CAAC;AACV,CAAC;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"index.js","names":[],"sources":["../package.json","../src/index.ts"],"sourcesContent":["","#!/usr/bin/env node\n// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\n\nimport { cwd, exit } from \"node:process\";\nimport { build } from \"@open-pioneer/build-package\";\nimport { Command } from \"commander\";\nimport { version } from \"../package.json\";\n\nconst program = new Command();\nprogram\n .name(\"build-pioneer-package\")\n .description(\"Builds an Open Pioneer Trails package for publishing.\")\n .option(\"-p, --package <path>\", \"package directory (defaults to current directory)\")\n .option(\"-r, --root <path>\", \"the root directory (optional, defaults to the workspace root)\")\n .option(\"-q, --silent\", \"disable logging\")\n .option(\"-d, --debug\", \"show exception stack traces\")\n .version(version);\nprogram.parse();\n\nasync function main() {\n const chalk = (await import(\"chalk\")).default;\n const opts = program.opts();\n const debug = opts.debug ?? false;\n const silent = opts.silent ?? false;\n const packagePath = opts.package ?? cwd();\n const rootDirectory = opts.root;\n try {\n await build({\n packageDirectory: packagePath,\n rootDirectory,\n logger: silent ? null : console\n });\n exit(0);\n } catch (e) {\n if (debug) {\n console.error(e);\n } else {\n let current: unknown = e;\n let prefix = \"\";\n while (current != null) {\n console.error(\n chalk.red(`${prefix}${(current as Error).message ?? String(current)}`)\n );\n current = (current as Error).cause;\n prefix = \"Caused by: \";\n }\n }\n exit(1);\n }\n}\n\nmain().catch((e) => {\n console.error(\"Fatal error\", e);\n exit(1);\n});\n"],"mappings":";;;;;;;;ACSA,MAAM,UAAU,IAAI,QAAQ;AAC5B,QACK,KAAK,uBAAuB,CAAC,CAC7B,YAAY,uDAAuD,CAAC,CACpE,OAAO,wBAAwB,mDAAmD,CAAC,CACnF,OAAO,qBAAqB,+DAA+D,CAAC,CAC5F,OAAO,gBAAgB,iBAAiB,CAAC,CACzC,OAAO,eAAe,6BAA6B,CAAC,CACpD,QAAQ,OAAO;AACpB,QAAQ,MAAM;AAEd,eAAe,OAAO;CAClB,MAAM,SAAS,MAAM,OAAO,SAAA,CAAU;CACtC,MAAM,OAAO,QAAQ,KAAK;CAC1B,MAAM,QAAQ,KAAK,SAAS;CAC5B,MAAM,SAAS,KAAK,UAAU;CAC9B,MAAM,cAAc,KAAK,WAAW,IAAI;CACxC,MAAM,gBAAgB,KAAK;CAC3B,IAAI;EACA,MAAM,MAAM;GACR,kBAAkB;GAClB;GACA,QAAQ,SAAS,OAAO;EAC5B,CAAC;EACD,KAAK,CAAC;CACV,SAAS,GAAG;EACR,IAAI,OACA,QAAQ,MAAM,CAAC;OACZ;GACH,IAAI,UAAmB;GACvB,IAAI,SAAS;GACb,OAAO,WAAW,MAAM;IACpB,QAAQ,MACJ,MAAM,IAAI,GAAG,SAAU,QAAkB,WAAW,OAAO,OAAO,GAAG,CACzE;IACA,UAAW,QAAkB;IAC7B,SAAS;GACb;EACJ;EACA,KAAK,CAAC;CACV;AACJ;AAEA,KAAK,CAAC,CAAC,OAAO,MAAM;CAChB,QAAQ,MAAM,eAAe,CAAC;CAC9B,KAAK,CAAC;AACV,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-pioneer/build-package-cli",
3
- "version": "3.2.2",
3
+ "version": "4.0.0",
4
4
  "description": "Provides a CLI tool to compile Open Pioneer Trails packages.",
5
5
  "keywords": [
6
6
  "open-pioneer-trails"
@@ -9,15 +9,14 @@
9
9
  "license": "Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/open-pioneer/trails-build-tools.git",
12
+ "url": "git+https://github.com/open-pioneer/trails-build-tools.git",
13
13
  "directory": "packages/build-package-cli"
14
14
  },
15
15
  "bin": {
16
16
  "build-pioneer-package": "./dist/index.js"
17
17
  },
18
18
  "files": [
19
- "dist/**/*.js",
20
- "dist/**/*.js.map",
19
+ "dist",
21
20
  "CHANGELOG.md",
22
21
  "README.md",
23
22
  "LICENSE"
@@ -26,18 +25,19 @@
26
25
  "dependencies": {
27
26
  "chalk": "^5.6.2",
28
27
  "commander": "^15.0.0",
29
- "@open-pioneer/build-package": "^4.3.2"
28
+ "@open-pioneer/build-package": "^5.0.0"
30
29
  },
31
30
  "devDependencies": {
32
- "build-tools": "0.0.1"
31
+ "publint": "^0.3.22",
32
+ "tsdown": "^0.22.14",
33
+ "shared-configs": "0.0.1"
33
34
  },
34
35
  "engines": {
35
36
  "node": ">= 20"
36
37
  },
37
38
  "scripts": {
38
39
  "clean": "rimraf dist",
39
- "build": "node build.mjs build",
40
- "build-dev": "node build.mjs buildDev",
41
- "dev": "node build.mjs watch"
40
+ "build": "tsdown",
41
+ "dev": "tsdown --watch"
42
42
  }
43
43
  }