@starci/jest-preset 2.3.3 → 2.3.5

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,7 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## 2.3.3 - 2026-10-21
4
- - Changed: the Sonar exclusions live in `sonar-exclusions.json` (published), which `sonarExclusions()` reads; @starci/hfs ships the same file byte for byte so `npx @starci/cli app scaffold` renders them without installing this preset. The list is unchanged.
3
+ ## 2.3.5 - 2026-10-23
4
+ - Changed: the preset sets no `testTimeout` (the jest default applies; a world spec sets its own), owner ruling 2026-10-22: no loosening.
5
+ - Changed: the type probes assert their compiler diagnostics (file, line, code) from their own rejected fixtures instead of inline ts directives; the generated metadata anchor carries no coverage-exclusion comment; a spec refuses any inline suppression in the package.
6
+
7
+ ## 2.3.4 - 2026-10-21
8
+ - Changed: supersedes 2.3.3, published from a lane whose history the owner refused (an unapproved allowlist entry) and therefore a superseded orphan that is not used; this version carries the same work plus the standalone scaffold fix.
9
+ - Changed: the Sonar exclusions live in `sonar-exclusions.cjs` (published, require-free), which `sonarExclusions()` reads; @starci/hfs ships the same file byte for byte so `npx @starci/cli app scaffold` renders them without installing this preset. The list is unchanged.
5
10
 
6
11
  ## 2.3.2 - 2026-10-18
7
12
  - Added: shard mode `STARCI_COVERAGE_SHARD=1` (only the loaded files are measured, no per-file threshold, istanbul JSON) and `@starci/jest-preset/merge` (istanbul-lib-coverage merge by source location, lcov through the preset reporter): the coverage job of the sharded managed CI.
package/index.cjs CHANGED
@@ -38,11 +38,11 @@ function collectCoverageFrom(coverage) {
38
38
  }
39
39
 
40
40
  /**
41
- * Sonar `sonar.exclusions`: specs, e2e specs, dist and coverage output are not analysed at all. The list lives in sonar-exclusions.json, a
42
- * plain data file @starci/hfs also ships byte for byte (packages/hfs/runtime, scripts/hfs/sync-runtime.mjs), so `starci app scaffold`
41
+ * Sonar `sonar.exclusions`: specs, e2e specs, dist and coverage output are not analysed at all. The list lives in sonar-exclusions.cjs, a
42
+ * require-free module @starci/hfs also ships byte for byte (packages/hfs/runtime, scripts/hfs/sync-runtime.mjs), so `starci app scaffold`
43
43
  * renders the same exclusions before any app dependency is installed.
44
44
  */
45
- const SONAR_EXCLUSIONS = require("./sonar-exclusions.json")
45
+ const SONAR_EXCLUSIONS = require("./sonar-exclusions.cjs")
46
46
 
47
47
  function sonarExclusions() {
48
48
  return SONAR_EXCLUSIONS.join(",")
@@ -232,7 +232,6 @@ function starciJestConfig(options) {
232
232
  // all-files instrumentation of collectCoverageFrom is off there: it instruments an unloaded file with another transform (other functions and branches).
233
233
  const shard = process.env.STARCI_COVERAGE_SHARD === "1"
234
234
  return {
235
- testTimeout: 120_000,
236
235
  coverageProvider: "v8",
237
236
  ...(shard ? {} : {
238
237
  collectCoverageFrom: collectCoverageFrom(coverage),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/jest-preset",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "description": "The StarCi jest config for Nest repositories (unit, integration, e2e and contract projects, ts-jest with diagnostics off, per-file 100 coverage of *.service.ts only) and the one shared unit-test double kit: typed mock<T>(), mockEntityManager(), fakeTransaction(), fakeCache(), fakeLock(), recordingEventBus(), recordingQueueOutbox(), fakeInbox(), FakeClock, fakeIds(), builder() and the Outcome matchers toBeRefused/toSucceedWith.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -63,7 +63,6 @@
63
63
  "LICENSE",
64
64
  "*.cjs",
65
65
  "*.d.ts",
66
- "sonar-exclusions.json",
67
66
  "!*.spec.*",
68
67
  "README.md",
69
68
  "CHANGELOG.md"
@@ -0,0 +1,8 @@
1
+ "use strict"
2
+
3
+ /**
4
+ * Sonar `sonar.exclusions`: specs, e2e specs, dist and coverage output are not analysed at all. A plain list with no require, so
5
+ * @starci/hfs ships this file byte for byte (packages/hfs/runtime, scripts/hfs/sync-runtime.mjs) and `starci app scaffold` renders
6
+ * the same exclusions before any app dependency is installed.
7
+ */
8
+ module.exports = Object.freeze(["**/*.spec.ts", "**/*.e2e-spec.ts", "**/dist/**", "**/coverage/**"])
package/unit-metadata.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  const METADATA_SOURCE = require.resolve("./unit-metadata.generated.cjs")
4
4
  const METADATA_TEXT = require("node:fs").readFileSync(METADATA_SOURCE, "utf8")
5
5
 
6
- /** Only synthetic conditional guards inside compiler-emitted parameter metadata map to the dedicated ignore anchor. */
6
+ /** Only synthetic conditional guards inside compiler-emitted parameter metadata map to the generated-metadata anchor: a zero-width position at its end, which no line covers, so they are measured nowhere and source metadata calls stay measured. */
7
7
  function factory(compiler) {
8
8
  const ts = compiler.configSet.compilerModule
9
9
  const source = ts.createSourceMapSource(METADATA_SOURCE, METADATA_TEXT)
@@ -12,7 +12,7 @@ function factory(compiler) {
12
12
  if (isGeneratedMetadata(ts, node)) {
13
13
  const guard = (child) => {
14
14
  if (isGeneratedGuard(ts, child)) {
15
- ts.setSourceMapRange(child, { pos: METADATA_TEXT.indexOf("\n") + 1, end: METADATA_TEXT.length - 1, source })
15
+ ts.setSourceMapRange(child, { pos: METADATA_TEXT.length, end: METADATA_TEXT.length, source })
16
16
  ts.setEmitFlags(child, ts.getEmitFlags(child) | ts.EmitFlags.NoNestedSourceMaps)
17
17
  return child
18
18
  }
@@ -54,10 +54,10 @@ function restoreMetadataSource(result) {
54
54
  function createTransformer(options) {
55
55
  const delegate = require("ts-jest").default.createTransformer(options)
56
56
  return {
57
- getCacheKey: (...args) => delegate.getCacheKey(...args) + ":starci-unit-metadata-5",
57
+ getCacheKey: (...args) => delegate.getCacheKey(...args) + ":starci-unit-metadata-6",
58
58
  process: (...args) => restoreMetadataSource(delegate.process(...args)),
59
59
  processAsync: async (...args) => restoreMetadataSource(await delegate.processAsync(...args)),
60
60
  }
61
61
  }
62
62
 
63
- module.exports = { name: "starci-unit-metadata", version: 5, factory, createTransformer }
63
+ module.exports = { name: "starci-unit-metadata", version: 6, factory, createTransformer }
@@ -1,2 +1 @@
1
- /* c8 ignore next */
2
1
  // Coverage anchor for generated design:paramtypes guards only.
@@ -1 +0,0 @@
1
- ["**/*.spec.ts", "**/*.e2e-spec.ts", "**/dist/**", "**/coverage/**"]