@citolab/tspci 2.9.10 → 2.9.11-beta.1

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.9.11-beta.1](/compare/v2.9.11-beta.0...v2.9.11-beta.1) (2026-03-11)
7
+
8
+ **Note:** Version bump only for package @citolab/tspci
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.9.11-beta.0](/compare/v2.9.10...v2.9.11-beta.0) (2026-03-11)
15
+
16
+ **Note:** Version bump only for package @citolab/tspci
17
+
18
+
19
+
20
+
21
+
6
22
  ## [2.9.10](/compare/v2.9.9...v2.9.10) (2026-03-11)
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.9.10",
3
+ "version": "2.9.11-beta.1",
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",
@@ -54,5 +54,5 @@
54
54
  "access": "public",
55
55
  "registry": "https://registry.npmjs.org/"
56
56
  },
57
- "gitHead": "5d514e4e118dd152f455964a08bc9bed43cb774b"
57
+ "gitHead": "3ec89a59bacdc7664c059a24918699dd440fd622"
58
58
  }
@@ -110,6 +110,15 @@ assert_file() {
110
110
  fi
111
111
  }
112
112
 
113
+ assert_file_contains() {
114
+ local file_path="$1"
115
+ local expected_text="$2"
116
+ if ! grep -Fq "${expected_text}" "${file_path}"; then
117
+ echo "ERROR: expected '${expected_text}' in ${file_path}" >&2
118
+ exit 1
119
+ fi
120
+ }
121
+
113
122
  run_base_build() {
114
123
  local project_dir="$1"
115
124
  (cd "${project_dir}" && npm run prod)
@@ -167,7 +176,10 @@ run_dev_start_smoke "${TEST_ROOT}/TypeScriptPci"
167
176
  echo "Scenario 3: TypeScript + tailwind PCI creates and builds"
168
177
  create_project "TypeScriptTailwindPci" "preact+tailwind" "TypeScript + tailwind PCI matrix test"
169
178
  assert_file "${TEST_ROOT}/TypeScriptTailwindPci/src/index.tsx"
179
+ # Tailwind regression guard: ensure content scanning picks up utility classes from TSX.
180
+ echo '<div className="bg-amber-500">Tailwind scan smoke</div>' >> "${TEST_ROOT}/TypeScriptTailwindPci/src/interaction.tsx"
170
181
  run_base_build "${TEST_ROOT}/TypeScriptTailwindPci"
182
+ assert_file_contains "${TEST_ROOT}/TypeScriptTailwindPci/dist/index.js" "bg-amber-500"
171
183
 
172
184
  echo "Scenario 4: add tspci-qbci and export .ci package"
173
185
  create_project "QbciPci" "typescript" "QBCI export matrix test"
@@ -187,6 +199,21 @@ echo "Scenario 6: add tspci-tao and export tao zip"
187
199
  create_project "TaoPci" "typescript" "TAO export matrix test"
188
200
  (cd "${TEST_ROOT}/TaoPci" && npm install --save-dev "file:$(npm_path "${TAO_TGZ}")" --cache "${NPM_CACHE_DIR}" --workspaces=false)
189
201
  (cd "${TEST_ROOT}/TaoPci" && npm run tspci -- add --target tao --ci)
202
+ node -e '
203
+ const fs = require("fs");
204
+ const pkgPath = process.argv[1];
205
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
206
+ const hasTaoDevDep = Boolean(pkg.devDependencies && pkg.devDependencies["@citolab/tspci-tao"]);
207
+ if (!hasTaoDevDep) {
208
+ console.error("ERROR: expected devDependency \"@citolab/tspci-tao\" after tspci add --target tao");
209
+ process.exit(1);
210
+ }
211
+ const hasPackageScript = Boolean(pkg.scripts && pkg.scripts["package:tao"]);
212
+ if (!hasPackageScript) {
213
+ console.error("ERROR: expected script \"package:tao\" after tspci add --target tao");
214
+ process.exit(1);
215
+ }
216
+ ' "${TEST_ROOT}/TaoPci/package.json"
190
217
  node -e '
191
218
  const fs = require("fs");
192
219
  const pkgPath = process.argv[1];
package/src/cli.js CHANGED
@@ -486,8 +486,8 @@ const run = async () => {
486
486
  const version = args.indexOf("--next") !== -1 ? "next" : "latest";
487
487
  const passCiFlag = args.indexOf("--ci") !== -1;
488
488
  const packageFilePath = path.join(PACKAGE_ROOT_PATH, "package.json");
489
- const packageFileContent = fs.readFileSync(packageFilePath, "utf8");
490
- const packageJson = JSON.parse(packageFileContent);
489
+ const readPackageJson = () => JSON.parse(fs.readFileSync(packageFilePath, "utf8"));
490
+ let packageJson = readPackageJson();
491
491
 
492
492
  const modifyPci = () => {
493
493
  const scriptFile = path.join(path.join(path.join(NODE_MODULES, `${targetName}`), "src"), `init.mjs`);
@@ -517,6 +517,7 @@ const run = async () => {
517
517
  cwd: PACKAGE_ROOT_PATH,
518
518
  stdio: [0, 1, 2],
519
519
  });
520
+ packageJson = readPackageJson();
520
521
  }
521
522
 
522
523
  // add a package script so users can export with a single command