@citolab/tspci 2.8.2 → 2.8.4

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
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.8.4](/compare/v2.8.3...v2.8.4) (2026-02-25)
7
+
8
+ **Note:** Version bump only for package @citolab/tspci
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.8.3](/compare/v2.8.2...v2.8.3) (2026-02-25)
15
+
16
+ **Note:** Version bump only for package @citolab/tspci
17
+
18
+
19
+
20
+
21
+
6
22
  ## [2.8.2](/compare/v2.8.1...v2.8.2) (2026-02-24)
7
23
 
8
24
  **Note:** Version bump only for package @citolab/tspci
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citolab/tspci",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
4
4
  "description": "an opiniated typescript ims-pci builder with tao integration",
5
5
  "author": "patrick <patrick.deklein@cito.nl>",
6
6
  "repository": "@citolab/tspci",
@@ -10,9 +10,9 @@
10
10
  "scripts": {
11
11
  "help": "tspci --help",
12
12
  "init": "tspci init --force --path=../../pcis",
13
- "test:init:local": "./scripts/test-init-local.sh",
14
- "test:init:smoke": "./scripts/test-init-local.sh",
15
- "test:init:matrix": "./scripts/test-init-matrix.sh"
13
+ "test:init:local": "bash ./scripts/test-init-local.sh",
14
+ "test:init:smoke": "bash ./scripts/test-init-local.sh",
15
+ "test:init:matrix": "bash ./scripts/test-init-matrix.sh"
16
16
  },
17
17
  "type": "module",
18
18
  "types": "types/index.d.ts",
@@ -52,5 +52,5 @@
52
52
  "access": "public",
53
53
  "registry": "https://registry.npmjs.org/"
54
54
  },
55
- "gitHead": "460f7339e0490caea95fc5e9bedfcd12ebfce41f"
55
+ "gitHead": "2ad2236ae56f3927ef2d836c987b86a94ba5c070"
56
56
  }
@@ -16,6 +16,16 @@ clean_dir_contents() {
16
16
  mkdir -p "${NPM_CACHE_DIR}"
17
17
  clean_dir_contents "${TEST_ROOT}"
18
18
 
19
+ # On Windows (Git Bash), convert Unix-style paths to native Windows paths so
20
+ # npm can resolve file: references correctly. No-op on Linux/macOS.
21
+ npm_path() {
22
+ if command -v cygpath &>/dev/null; then
23
+ cygpath -m "$1"
24
+ else
25
+ echo "$1"
26
+ fi
27
+ }
28
+
19
29
  TARBALLS=()
20
30
  cleanup() {
21
31
  for file in "${TARBALLS[@]:-}"; do
@@ -37,7 +47,7 @@ pack_local_pkg() {
37
47
  local tgz
38
48
  prepare_pkg_for_pack "${pkg_dir}"
39
49
  echo " - packing ${pkg_name}" >&2
40
- tgz="$(cd "${pkg_dir}" && npm pack --silent --ignore-scripts --cache "${NPM_CACHE_DIR}" | tail -n 1)"
50
+ tgz="$(cd "${pkg_dir}" && npm pack --silent --ignore-scripts --cache "${NPM_CACHE_DIR}" | tail -n 1 | tr -d '\r')"
41
51
  local full_path="${pkg_dir}/${tgz}"
42
52
  TARBALLS+=("${full_path}")
43
53
  echo "${full_path}"
@@ -76,7 +86,7 @@ create_project() {
76
86
  pkg.dependencies["@citolab/preact-store"] = `file:${preactStoreTar}`;
77
87
  }
78
88
  fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
79
- ' "${project_dir}/package.json" "${TSPCI_TGZ}" "${PREACT_STORE_TGZ}"
89
+ ' "${project_dir}/package.json" "$(npm_path "${TSPCI_TGZ}")" "$(npm_path "${PREACT_STORE_TGZ}")"
80
90
 
81
91
  (cd "${project_dir}" && npm install --cache "${NPM_CACHE_DIR}" --workspaces=false)
82
92
  }
@@ -112,21 +122,21 @@ run_base_build "${TEST_ROOT}/TypeScriptTailwindPci"
112
122
 
113
123
  echo "Scenario 4: add tspci-qbci and export .ci package"
114
124
  create_project "QbciPci" "typescript" "QBCI export matrix test"
115
- (cd "${TEST_ROOT}/QbciPci" && npm install --save-dev "file:${QBCI_TGZ}" --cache "${NPM_CACHE_DIR}" --workspaces=false)
125
+ (cd "${TEST_ROOT}/QbciPci" && npm install --save-dev "file:$(npm_path "${QBCI_TGZ}")" --cache "${NPM_CACHE_DIR}" --workspaces=false)
116
126
  (cd "${TEST_ROOT}/QbciPci" && npm run tspci -- add --target qbci)
117
127
  (cd "${TEST_ROOT}/QbciPci" && npm run prod -- --target qbci)
118
128
  ls "${TEST_ROOT}/QbciPci/ci-dist/"*.ci >/dev/null
119
129
 
120
130
  echo "Scenario 5: add tspci-qti3 and export qti3 zip"
121
131
  create_project "Qti3Pci" "typescript" "QTI3 export matrix test"
122
- (cd "${TEST_ROOT}/Qti3Pci" && npm install --save-dev "file:${QTI3_TGZ}" --cache "${NPM_CACHE_DIR}" --workspaces=false)
132
+ (cd "${TEST_ROOT}/Qti3Pci" && npm install --save-dev "file:$(npm_path "${QTI3_TGZ}")" --cache "${NPM_CACHE_DIR}" --workspaces=false)
123
133
  (cd "${TEST_ROOT}/Qti3Pci" && npm run tspci -- add --target qti3)
124
134
  (cd "${TEST_ROOT}/Qti3Pci" && npm run prod -- --target qti3)
125
135
  ls "${TEST_ROOT}/Qti3Pci/qti3-dist/"*.zip >/dev/null
126
136
 
127
137
  echo "Scenario 6: add tspci-tao and export tao zip"
128
138
  create_project "TaoPci" "typescript" "TAO export matrix test"
129
- (cd "${TEST_ROOT}/TaoPci" && npm install --save-dev "file:${TAO_TGZ}" --cache "${NPM_CACHE_DIR}" --workspaces=false)
139
+ (cd "${TEST_ROOT}/TaoPci" && npm install --save-dev "file:$(npm_path "${TAO_TGZ}")" --cache "${NPM_CACHE_DIR}" --workspaces=false)
130
140
  (cd "${TEST_ROOT}/TaoPci" && npm run tspci -- add --target tao --ci)
131
141
  node -e '
132
142
  const fs = require("fs");
@@ -146,7 +156,7 @@ ls "${TEST_ROOT}/TaoPci/dist/tao-pci-"*.zip >/dev/null
146
156
 
147
157
  echo "Scenario 7: preact-store with TypeScript + tailwind builds"
148
158
  create_project "TailwindPreactStorePci" "preact+tailwind" "Tailwind + preact-store matrix test"
149
- (cd "${TEST_ROOT}/TailwindPreactStorePci" && npm install --save "file:${PREACT_STORE_TGZ}" --cache "${NPM_CACHE_DIR}" --workspaces=false)
159
+ (cd "${TEST_ROOT}/TailwindPreactStorePci" && npm install --save "file:$(npm_path "${PREACT_STORE_TGZ}")" --cache "${NPM_CACHE_DIR}" --workspaces=false)
150
160
  run_base_build "${TEST_ROOT}/TailwindPreactStorePci"
151
161
 
152
162
  echo ""
package/src/cli.js CHANGED
@@ -14,7 +14,7 @@ import inquirer from "inquirer";
14
14
  const args = process.argv.slice(2);
15
15
 
16
16
  // PK: retreive dirname, most of the time automaticly inserted in es modules
17
- import { fileURLToPath } from "url";
17
+ import { fileURLToPath, pathToFileURL } from "url";
18
18
  const __filename = fileURLToPath(import.meta.url);
19
19
  const __dirname = path.dirname(__filename);
20
20
 
@@ -446,7 +446,7 @@ const run = async () => {
446
446
  let init = false;
447
447
  if (fs.existsSync(scriptFile)) {
448
448
  // run init() script
449
- import(`file:///${scriptFile}`).then((script) => {
449
+ import(pathToFileURL(scriptFile).href).then((script) => {
450
450
  if (script.init) {
451
451
  init = true;
452
452
  console.log(chalk.green(`Running init script for ${targetName}`));
@@ -511,7 +511,7 @@ const run = async () => {
511
511
  return;
512
512
  }
513
513
  const scriptFile = path.join(path.join(path.join(NODE_MODULES, `${targetName}`), "src"), `createPackage.mjs`);
514
- import(`file:///${scriptFile}`).then((script) => {
514
+ import(pathToFileURL(scriptFile).href).then((script) => {
515
515
  script.bundle();
516
516
  });
517
517
  });