dsh-standards 1.0.2 → 1.1.2

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.
Files changed (205) hide show
  1. package/40-checker/README.md +0 -0
  2. package/40-checker/bin/dsh-plugin-verify.mjs +0 -0
  3. package/40-checker/fixtures/bad/index.mjs +0 -0
  4. package/40-checker/fixtures/bad/package.json +0 -0
  5. package/40-checker/fixtures/bad-manifest/index.js +0 -0
  6. package/40-checker/fixtures/bad-manifest/package.json +0 -0
  7. package/40-checker/fixtures/bundle/cordis.patch.yml +0 -0
  8. package/40-checker/fixtures/bundle/package.json +0 -0
  9. package/40-checker/fixtures/bundle/server.mjs +0 -0
  10. package/40-checker/fixtures/bundle-patch-only/cordis.patch.yml +3 -0
  11. package/40-checker/fixtures/bundle-patch-only/package.json +12 -0
  12. package/40-checker/fixtures/bundle-v0/cordis.patch.yml +0 -0
  13. package/40-checker/fixtures/bundle-v0/package.json +0 -0
  14. package/40-checker/fixtures/bundle-v0/server.mjs +0 -0
  15. package/40-checker/fixtures/c12-command-arg/index.mjs +7 -0
  16. package/40-checker/fixtures/c12-command-arg/package.json +10 -0
  17. package/40-checker/fixtures/c12-comment/index.mjs +3 -0
  18. package/40-checker/fixtures/c12-comment/package.json +10 -0
  19. package/40-checker/fixtures/c12-compare/index.mjs +3 -0
  20. package/40-checker/fixtures/c12-compare/package.json +10 -0
  21. package/40-checker/fixtures/c12-doc-string/index.mjs +13 -0
  22. package/40-checker/fixtures/c12-doc-string/package.json +10 -0
  23. package/40-checker/fixtures/c12-grant/index.mjs +3 -0
  24. package/40-checker/fixtures/c12-grant/package.json +10 -0
  25. package/40-checker/fixtures/c12-string/index.mjs +3 -0
  26. package/40-checker/fixtures/c12-string/package.json +10 -0
  27. package/40-checker/fixtures/client-missing/client.js +0 -0
  28. package/40-checker/fixtures/client-missing/index.js +0 -0
  29. package/40-checker/fixtures/client-missing/package.json +0 -0
  30. package/40-checker/fixtures/declaration-file/index.d.ts +1 -0
  31. package/40-checker/fixtures/declaration-file/index.mjs +9 -0
  32. package/40-checker/fixtures/declaration-file/package.json +10 -0
  33. package/40-checker/fixtures/flow-config/index.js +0 -0
  34. package/40-checker/fixtures/flow-config/package.json +0 -0
  35. package/40-checker/fixtures/fs-write/index.mjs +0 -0
  36. package/40-checker/fixtures/fs-write/package.json +0 -0
  37. package/40-checker/fixtures/good/index.mjs +0 -0
  38. package/40-checker/fixtures/good/package.json +0 -0
  39. package/40-checker/fixtures/hang/index.mjs +0 -0
  40. package/40-checker/fixtures/hang/package.json +0 -0
  41. package/40-checker/fixtures/import-local-side-effect/index.mjs +11 -0
  42. package/40-checker/fixtures/import-local-side-effect/package.json +21 -0
  43. package/40-checker/fixtures/import-local-side-effect/side-effectful.mjs +5 -0
  44. package/40-checker/fixtures/import-open-readonly/index.mjs +14 -0
  45. package/40-checker/fixtures/import-open-readonly/package.json +19 -0
  46. package/40-checker/fixtures/import-package-only/index.mjs +11 -0
  47. package/40-checker/fixtures/import-package-only/package.json +21 -0
  48. package/40-checker/fixtures/import-parse-error/index.mjs +5 -0
  49. package/40-checker/fixtures/import-parse-error/package.json +10 -0
  50. package/40-checker/fixtures/import-side-effect/index.mjs +14 -0
  51. package/40-checker/fixtures/import-side-effect/package.json +19 -0
  52. package/40-checker/fixtures/import-side-effect-nonentry/index.mjs +9 -0
  53. package/40-checker/fixtures/import-side-effect-nonentry/package.json +19 -0
  54. package/40-checker/fixtures/import-side-effect-nonentry/selfcheck.mjs +8 -0
  55. package/40-checker/fixtures/import-void-main/index.mjs +16 -0
  56. package/40-checker/fixtures/import-void-main/package.json +19 -0
  57. package/40-checker/fixtures/known-answer/expected.json +0 -0
  58. package/40-checker/fixtures/market-index-real.json +0 -0
  59. package/40-checker/fixtures/market-index.json +0 -0
  60. package/40-checker/fixtures/negative/bad-entry/package.json +0 -0
  61. package/40-checker/fixtures/negative/no-entry/package.json +0 -0
  62. package/40-checker/fixtures/negative/no-patch/package.json +0 -0
  63. package/40-checker/fixtures/negative/root-missing/cordis.patch.yml +0 -0
  64. package/40-checker/fixtures/negative/root-missing/package.json +0 -0
  65. package/40-checker/fixtures/negative/workspace/package.json +0 -0
  66. package/40-checker/fixtures/no-source/package.json +19 -0
  67. package/40-checker/fixtures/parse-error-nonentry/index.mjs +2 -0
  68. package/40-checker/fixtures/parse-error-nonentry/package.json +10 -0
  69. package/40-checker/fixtures/parse-error-nonentry/references/broken.js +1 -0
  70. package/40-checker/package.json +0 -0
  71. package/40-checker/samples/README.md +0 -0
  72. package/40-checker/samples/entry18.json +0 -0
  73. package/40-checker/samples/frame.json +0 -0
  74. package/40-checker/scripts/apply-overlay.mjs +0 -0
  75. package/40-checker/scripts/attestation-check.mjs +0 -0
  76. package/40-checker/scripts/bundle-smoke.mjs +0 -0
  77. package/40-checker/scripts/claim-check.mjs +0 -0
  78. package/40-checker/scripts/clause-map.mjs +0 -0
  79. package/40-checker/scripts/collect-fixtures.mjs +0 -0
  80. package/40-checker/scripts/dashboard.mjs +0 -0
  81. package/40-checker/scripts/dco-check.mjs +0 -0
  82. package/40-checker/scripts/dependabot-check.mjs +0 -0
  83. package/40-checker/scripts/doc-commands-check.mjs +0 -0
  84. package/40-checker/scripts/entry-scan.mjs +0 -0
  85. package/40-checker/scripts/entry-validate.mjs +0 -0
  86. package/40-checker/scripts/entry18-attribution.mjs +0 -0
  87. package/40-checker/scripts/entry18-ci.mjs +0 -0
  88. package/40-checker/scripts/entry18-realweb-summary.mjs +0 -0
  89. package/40-checker/scripts/entry18-web.mjs +0 -0
  90. package/40-checker/scripts/evidence-chain.mjs +0 -0
  91. package/40-checker/scripts/flow-index.mjs +0 -0
  92. package/40-checker/scripts/flow-sample-ci.mjs +0 -0
  93. package/40-checker/scripts/governance-check.mjs +0 -0
  94. package/40-checker/scripts/host-farm.mjs +0 -0
  95. package/40-checker/scripts/journey-config-observe.mjs +0 -0
  96. package/40-checker/scripts/journey-disclosure-shape.mjs +0 -0
  97. package/40-checker/scripts/journey-runtime.mjs +0 -0
  98. package/40-checker/scripts/journey.mjs +0 -0
  99. package/40-checker/scripts/label-drift.mjs +0 -0
  100. package/40-checker/scripts/label-sync.mjs +0 -0
  101. package/40-checker/scripts/label-verify.mjs +0 -0
  102. package/40-checker/scripts/landlock-exec.c +0 -0
  103. package/40-checker/scripts/level-audit.mjs +0 -0
  104. package/40-checker/scripts/m1-sidecar.mjs +0 -0
  105. package/40-checker/scripts/m2-runner.mjs +0 -0
  106. package/40-checker/scripts/round-robin.mjs +0 -0
  107. package/40-checker/scripts/runtime-child.mjs +0 -0
  108. package/40-checker/scripts/sample-frame.mjs +0 -0
  109. package/40-checker/scripts/sample20-ci.mjs +0 -0
  110. package/40-checker/scripts/sample60-ci.mjs +0 -0
  111. package/40-checker/scripts/stale-check.mjs +0 -0
  112. package/40-checker/scripts/surveillance.mjs +0 -0
  113. package/40-checker/scripts/web-probe.mjs +0 -0
  114. package/40-checker/src/cli.mjs +1 -1
  115. package/40-checker/src/client-shape.mjs +0 -0
  116. package/40-checker/src/declarations.mjs +514 -19
  117. package/40-checker/src/index.mjs +0 -0
  118. package/40-checker/src/install-spec.mjs +0 -0
  119. package/40-checker/src/label.mjs +0 -0
  120. package/40-checker/src/manifest.mjs +5 -0
  121. package/40-checker/src/permissions.mjs +0 -0
  122. package/40-checker/src/report.mjs +0 -0
  123. package/40-checker/src/result.mjs +0 -0
  124. package/40-checker/src/runtime.mjs +0 -0
  125. package/40-checker/src/semver.mjs +0 -0
  126. package/40-checker/src/util.mjs +0 -0
  127. package/40-checker/test/attestation.test.mjs +0 -0
  128. package/40-checker/test/checks.test.mjs +243 -1
  129. package/40-checker/test/claim.test.mjs +0 -0
  130. package/40-checker/test/client-shape.test.mjs +0 -0
  131. package/40-checker/test/dco.test.mjs +0 -0
  132. package/40-checker/test/entry-validate.test.mjs +0 -0
  133. package/40-checker/test/governance.test.mjs +0 -0
  134. package/40-checker/test/label.test.mjs +0 -0
  135. package/40-checker/test/level-audit.test.mjs +0 -0
  136. package/40-checker/test/levels.test.mjs +0 -0
  137. package/40-checker/test/ops.test.mjs +0 -0
  138. package/40-checker/test/permissions.test.mjs +0 -0
  139. package/40-checker/test/semver.test.mjs +0 -0
  140. package/40-checker/test/verify.test.mjs +0 -0
  141. package/40-checker/vendor/babel/README.md +10 -0
  142. package/40-checker/vendor/babel/index.cjs +3 -0
  143. package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/LICENSE +22 -0
  144. package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/README.md +19 -0
  145. package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/lib/index.d.ts +41 -0
  146. package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/lib/index.js +286 -0
  147. package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/package.json +31 -0
  148. package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
  149. package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/README.md +19 -0
  150. package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/identifier-browser.js +62 -0
  151. package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/identifier.js +60 -0
  152. package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/index.d.ts +28 -0
  153. package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/index.js +27 -0
  154. package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/package.json +45 -0
  155. package/40-checker/vendor/babel/node_modules/@babel/parser/CHANGELOG.md +1073 -0
  156. package/40-checker/vendor/babel/node_modules/@babel/parser/LICENSE +19 -0
  157. package/40-checker/vendor/babel/node_modules/@babel/parser/README.md +19 -0
  158. package/40-checker/vendor/babel/node_modules/@babel/parser/bin/babel-parser.js +14 -0
  159. package/40-checker/vendor/babel/node_modules/@babel/parser/lib/index.d.ts +1047 -0
  160. package/40-checker/vendor/babel/node_modules/@babel/parser/lib/index.js +14612 -0
  161. package/40-checker/vendor/babel/node_modules/@babel/parser/package.json +57 -0
  162. package/40-checker/vendor/babel/node_modules/@babel/parser/typings/babel-parser.d.ts +636 -0
  163. package/40-checker/vendor/babel/node_modules/@babel/types/LICENSE +22 -0
  164. package/40-checker/vendor/babel/node_modules/@babel/types/README.md +19 -0
  165. package/40-checker/vendor/babel/node_modules/@babel/types/lib/index-legacy.d.ts +2765 -0
  166. package/40-checker/vendor/babel/node_modules/@babel/types/lib/index.d.ts +3668 -0
  167. package/40-checker/vendor/babel/node_modules/@babel/types/lib/index.js +10758 -0
  168. package/40-checker/vendor/babel/node_modules/@babel/types/lib/index.js.flow +2618 -0
  169. package/40-checker/vendor/babel/node_modules/@babel/types/package.json +38 -0
  170. package/CHANGELOG.md +50 -0
  171. package/LICENSE +0 -0
  172. package/LICENSE-APACHE +0 -0
  173. package/LICENSE-CC-BY +0 -0
  174. package/NOTICE +0 -0
  175. package/NOTICE.md +0 -0
  176. package/README.md +0 -0
  177. package/bin/dsh-levels.mjs +0 -0
  178. package/bin/dsh-standards.mjs +0 -0
  179. package/docs/BOOST-FIXTURES-2026-11-02.md +0 -0
  180. package/docs/DEVELOPER-JOURNEY.md +0 -0
  181. package/docs/HOST-J3-BUG-REPORT-DRAFT.md +0 -0
  182. package/docs/HOST-J3-CONFIG-REPRO-2026-11-02.md +0 -0
  183. package/docs/NAMING-FALLBACK.md +0 -0
  184. package/docs/fork-policy.md +0 -0
  185. package/docs/full-test-plan-2026-11-02.md +0 -0
  186. package/docs/incident.md +0 -0
  187. package/docs/onboarding.md +0 -0
  188. package/docs/privacy.md +0 -0
  189. package/docs/release.md +0 -0
  190. package/docs/scope-security.md +0 -0
  191. package/docs/status-taxonomy.md +0 -0
  192. package/docs/sunset.md +0 -0
  193. package/docs/translating.md +0 -0
  194. package/package.json +2 -1
  195. package/spec/README.md +0 -0
  196. package/spec/boost/README.md +0 -0
  197. package/spec/clauses.json +0 -0
  198. package/spec/entry/README.md +0 -0
  199. package/spec/flow/README.md +0 -0
  200. package/spec/levels.json +0 -0
  201. package/spec/levels.schema.json +0 -0
  202. package/spec/reference-suite.json +0 -0
  203. package/spec/schemas/attestation.schema.json +0 -0
  204. package/spec/schemas/evidence.schema.json +0 -0
  205. package/spec/schemas/report.schema.json +0 -0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: fixture-bundle-server
3
+ name: './server.mjs'
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@dsh-fixtures/bundle-patch-only",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
6
+ "dsh": {
7
+ "manifestVersion": 1,
8
+ "bundle": { "patch": "./cordis.patch.yml" },
9
+ "capabilities": [],
10
+ "labels": []
11
+ }
12
+ }
File without changes
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ import { spawnSync } from 'node:child_process'
2
+
3
+ export const name = 'c12-command-arg'
4
+ export function apply() {}
5
+
6
+ // C-12.4: --add-dir is a real command-line argument here, not documentation.
7
+ spawnSync('dsh', ['agent', '--add-dir', './docs'], { stdio: 'inherit' })
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@dsh-fixtures/c12-command-arg",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": { ".": "./index.mjs" },
8
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
9
+ "dsh": { "manifestVersion": 1, "kind": "plugin", "capabilities": [], "labels": [] }
10
+ }
@@ -0,0 +1,3 @@
1
+ export const name = 'c12-comment'
2
+ export function apply() {}
3
+ // danger-full-access belongs in a comment only
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@dsh-fixtures/c12-comment",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": { ".": "./index.mjs" },
8
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
9
+ "dsh": { "manifestVersion": 1, "kind": "plugin", "capabilities": [], "labels": [] }
10
+ }
@@ -0,0 +1,3 @@
1
+ export const name = 'c12-compare'
2
+ export function apply() {}
3
+ if (mode === 'danger-full-access') { /* comparison, not a grant */ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@dsh-fixtures/c12-compare",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": { ".": "./index.mjs" },
8
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
9
+ "dsh": { "manifestVersion": 1, "kind": "plugin", "capabilities": [], "labels": [] }
10
+ }
@@ -0,0 +1,13 @@
1
+ export const name = 'c12-doc-string'
2
+ export function apply() {}
3
+
4
+ // Documentation, not a grant: the literals below are labels and help text.
5
+ const documentation = {
6
+ desc: 'danger-full-access',
7
+ description: '--add-dir',
8
+ help: 'danger-full-access',
9
+ }
10
+
11
+ console.log('danger-full-access')
12
+ console.info('--add-dir')
13
+ console.warn(`mode: ${'danger-full-access'}`)
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@dsh-fixtures/c12-doc-string",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": { ".": "./index.mjs" },
8
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
9
+ "dsh": { "manifestVersion": 1, "kind": "plugin", "capabilities": [], "labels": [] }
10
+ }
@@ -0,0 +1,3 @@
1
+ export const name = 'c12-grant'
2
+ export function apply() {}
3
+ svc.set(session, 'danger-full-access')
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@dsh-fixtures/c12-grant",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": { ".": "./index.mjs" },
8
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
9
+ "dsh": { "manifestVersion": 1, "kind": "plugin", "capabilities": [], "labels": [] }
10
+ }
@@ -0,0 +1,3 @@
1
+ export const name = 'c12-string'
2
+ export function apply() {}
3
+ console.log('use danger-full-access for this case')
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@dsh-fixtures/c12-string",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": { ".": "./index.mjs" },
8
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
9
+ "dsh": { "manifestVersion": 1, "kind": "plugin", "capabilities": [], "labels": [] }
10
+ }
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export declare function broken(: string
@@ -0,0 +1,9 @@
1
+ export const name = 'fixture-declaration-file'
2
+ export const inject = ['sessions']
3
+ export const provide = ['declaration-file']
4
+
5
+ export function apply(ctx) {
6
+ const sessions = ctx.sessions
7
+ ctx.provide('declaration-file', { hasSessions: Boolean(sessions) })
8
+ ctx.effect(() => () => {}, 'fixture.declaration-file.effect')
9
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@dsh-fixtures/declaration-file",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": { ".": "./index.mjs" },
8
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
9
+ "dsh": { "manifestVersion": 1, "kind": "plugin", "capabilities": ["sessions:read"], "labels": [] }
10
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ import './side-effectful.mjs'
2
+
3
+ export const name = 'fixture-import-local-side-effect'
4
+ export const inject = ['sessions']
5
+ export const provide = ['import-local-side-effect']
6
+
7
+ export function apply(ctx) {
8
+ const sessions = ctx.sessions
9
+ ctx.provide('import-local-side-effect', { hasSessions: Boolean(sessions) })
10
+ ctx.effect(() => () => {}, 'fixture.import-local-side-effect.effect')
11
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@dsh-fixtures/import-local-side-effect",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": {
8
+ ".": "./index.mjs"
9
+ },
10
+ "engines": {
11
+ "dsh": ">=0.2.2-alpha.2 <0.3.0"
12
+ },
13
+ "dsh": {
14
+ "manifestVersion": 1,
15
+ "kind": "plugin",
16
+ "capabilities": [
17
+ "sessions:read"
18
+ ],
19
+ "labels": []
20
+ }
21
+ }
@@ -0,0 +1,5 @@
1
+ import { writeFileSync } from 'node:fs'
2
+
3
+ // C-10.3: the entry imports this module with a relative specifier, so its
4
+ // module-scope write executes on import of the entry.
5
+ writeFileSync('/tmp/dsh-fixture-import-local-side-effect.txt', 'x')
@@ -0,0 +1,14 @@
1
+ import { openSync } from 'node:fs'
2
+
3
+ export const name = 'fixture-import-open-readonly'
4
+ export const inject = ['sessions']
5
+ export const provide = ['import-open-readonly']
6
+
7
+ export function apply(ctx) {
8
+ const sessions = ctx.sessions
9
+ ctx.provide('import-open-readonly', { hasSessions: Boolean(sessions) })
10
+ ctx.effect(() => () => {}, 'fixture.import-open-readonly.effect')
11
+ }
12
+
13
+ // C-10.4 is about fs *writes*; a read-only open is a different side effect.
14
+ openSync(new URL(import.meta.url), 'r')
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@dsh-fixtures/import-open-readonly",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": {
8
+ ".": "./index.mjs"
9
+ },
10
+ "engines": {
11
+ "dsh": ">=0.2.2-alpha.2 <0.3.0"
12
+ },
13
+ "dsh": {
14
+ "manifestVersion": 1,
15
+ "kind": "plugin",
16
+ "capabilities": ["sessions:read"],
17
+ "labels": []
18
+ }
19
+ }
@@ -0,0 +1,11 @@
1
+ import path from 'node:path'
2
+
3
+ export const name = 'fixture-import-package-only'
4
+ export const inject = ['sessions']
5
+ export const provide = ['import-package-only']
6
+
7
+ export function apply(ctx) {
8
+ const sessions = ctx.sessions
9
+ ctx.provide('import-package-only', { basename: path.basename('.'), hasSessions: Boolean(sessions) })
10
+ ctx.effect(() => () => {}, 'fixture.import-package-only.effect')
11
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@dsh-fixtures/import-package-only",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": {
8
+ ".": "./index.mjs"
9
+ },
10
+ "engines": {
11
+ "dsh": ">=0.2.2-alpha.2 <0.3.0"
12
+ },
13
+ "dsh": {
14
+ "manifestVersion": 1,
15
+ "kind": "plugin",
16
+ "capabilities": [
17
+ "sessions:read"
18
+ ],
19
+ "labels": []
20
+ }
21
+ }
@@ -0,0 +1,5 @@
1
+ export const name = 'fixture-import-parse-error'
2
+ export function apply() {
3
+ // Deliberately invalid syntax: the AST check must report not-run, not PASS.
4
+ }
5
+ const broken = {
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@dsh-fixtures/import-parse-error",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": { ".": "./index.mjs" },
8
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
9
+ "dsh": { "manifestVersion": 1, "kind": "plugin", "capabilities": [], "labels": [] }
10
+ }
@@ -0,0 +1,14 @@
1
+ import { writeFileSync } from 'node:fs'
2
+
3
+ export const name = 'fixture-import-side-effect'
4
+ export const inject = ['sessions']
5
+ export const provide = ['import-side-effect']
6
+
7
+ export function apply(ctx) {
8
+ const sessions = ctx.sessions
9
+ ctx.provide('import-side-effect', { hasSessions: Boolean(sessions) })
10
+ ctx.effect(() => () => {}, 'fixture.import-side-effect.effect')
11
+ }
12
+
13
+ // DSC-10.4: a module-scope fs mutation, executed on import.
14
+ writeFileSync('/tmp/dsh-fixture-import-side-effect.txt', 'x')
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@dsh-fixtures/import-side-effect",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": {
8
+ ".": "./index.mjs"
9
+ },
10
+ "engines": {
11
+ "dsh": ">=0.2.2-alpha.2 <0.3.0"
12
+ },
13
+ "dsh": {
14
+ "manifestVersion": 1,
15
+ "kind": "plugin",
16
+ "capabilities": ["sessions:read"],
17
+ "labels": []
18
+ }
19
+ }
@@ -0,0 +1,9 @@
1
+ export const name = 'fixture-import-side-effect-nonentry'
2
+ export const inject = ['sessions']
3
+ export const provide = ['import-side-effect-nonentry']
4
+
5
+ export function apply(ctx) {
6
+ const sessions = ctx.sessions
7
+ ctx.provide('import-side-effect-nonentry', { hasSessions: Boolean(sessions) })
8
+ ctx.effect(() => () => {}, 'fixture.import-side-effect-nonentry.effect')
9
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@dsh-fixtures/import-side-effect-nonentry",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": {
8
+ ".": "./index.mjs"
9
+ },
10
+ "engines": {
11
+ "dsh": ">=0.2.2-alpha.2 <0.3.0"
12
+ },
13
+ "dsh": {
14
+ "manifestVersion": 1,
15
+ "kind": "plugin",
16
+ "capabilities": ["sessions:read"],
17
+ "labels": []
18
+ }
19
+ }
@@ -0,0 +1,8 @@
1
+ // Preflight helper shipped with the package, never imported by the entry module.
2
+ // A module-scope fs mutation here is not an entry import-time side effect (C-10.3).
3
+ import { mkdirSync } from 'node:fs'
4
+
5
+ mkdirSync('/tmp/dsh-fixture-selfcheck', { recursive: true })
6
+
7
+ // Same class of module-scope work, but still outside the entry module.
8
+ globalThis.__dshFixtureSelfcheck = true
@@ -0,0 +1,16 @@
1
+ export const name = 'fixture-import-void-main'
2
+ export const inject = ['sessions']
3
+ export const provide = ['import-void-main']
4
+
5
+ export function apply(ctx) {
6
+ const sessions = ctx.sessions
7
+ ctx.provide('import-void-main', { hasSessions: Boolean(sessions) })
8
+ ctx.effect(() => () => {}, 'fixture.import-void-main.effect')
9
+ }
10
+
11
+ function main() {
12
+ return undefined
13
+ }
14
+
15
+ // C-10.2: an immediate module-scope call, expressed as `void main()`.
16
+ void main()
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@dsh-fixtures/import-void-main",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": {
8
+ ".": "./index.mjs"
9
+ },
10
+ "engines": {
11
+ "dsh": ">=0.2.2-alpha.2 <0.3.0"
12
+ },
13
+ "dsh": {
14
+ "manifestVersion": 1,
15
+ "kind": "plugin",
16
+ "capabilities": ["sessions:read"],
17
+ "labels": []
18
+ }
19
+ }
File without changes
File without changes
File without changes
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@dsh-fixtures/no-source",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": {
8
+ ".": "./index.mjs"
9
+ },
10
+ "engines": {
11
+ "dsh": ">=0.2.2-alpha.2 <0.3.0"
12
+ },
13
+ "dsh": {
14
+ "manifestVersion": 1,
15
+ "kind": "plugin",
16
+ "capabilities": ["sessions:read"],
17
+ "labels": []
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+ export const name = 'fixture-parse-error-nonentry'
2
+ export function apply() {}
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@dsh-fixtures/parse-error-nonentry",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": { ".": "./index.mjs" },
8
+ "engines": { "dsh": ">=0.2.2-alpha.2 <0.3.0" },
9
+ "dsh": { "manifestVersion": 1, "kind": "plugin", "capabilities": [], "labels": [] }
10
+ }
@@ -0,0 +1 @@
1
+ export const broken = {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes