@rohal12/spindle 0.61.0 → 0.61.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.
- package/dist/pkg/format.js +1 -1
- package/dist/pkg/headless.js +1 -0
- package/dist/pkg/story-variables.js +1 -0
- package/package.json +4 -4
- package/src/js-lexer.ts +2 -0
- package/types/headless.d.ts +1 -1
- package/types/play.d.ts +2 -2
package/dist/pkg/headless.js
CHANGED
|
@@ -9572,6 +9572,7 @@ var SigilParser = class extends Parser {
|
|
|
9572
9572
|
braceIsBlock(prevType) {
|
|
9573
9573
|
if (prevType === types$1.colon && this.colonEndsTernary) return false;
|
|
9574
9574
|
if (prevType === types$1.braceR && this.closedBlock) return true;
|
|
9575
|
+
if (prevType === types$1._do) return true;
|
|
9575
9576
|
if (prevType === types$1.name && this.prevValue === "static") return true;
|
|
9576
9577
|
if (this.breakHere && OPERAND_ENDS.has(prevType)) {
|
|
9577
9578
|
const { context } = this;
|
|
@@ -9075,6 +9075,7 @@ var SigilParser = class extends Parser {
|
|
|
9075
9075
|
braceIsBlock(prevType) {
|
|
9076
9076
|
if (prevType === types$1.colon && this.colonEndsTernary) return false;
|
|
9077
9077
|
if (prevType === types$1.braceR && this.closedBlock) return true;
|
|
9078
|
+
if (prevType === types$1._do) return true;
|
|
9078
9079
|
if (prevType === types$1.name && this.prevValue === "static") return true;
|
|
9079
9080
|
if (this.breakHere && OPERAND_ENDS.has(prevType)) {
|
|
9080
9081
|
const { context } = this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rohal12/spindle",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Preact-based story format for Twine 2.",
|
|
6
6
|
"license": "Unlicense",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"test:coverage": "vitest run --coverage",
|
|
64
64
|
"test:watch": "vitest",
|
|
65
65
|
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
66
|
-
"typecheck": "tsc --noEmit && tsc --noEmit -p test",
|
|
66
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p test && tsc -p test/types-consumer",
|
|
67
67
|
"format": "prettier --write .",
|
|
68
68
|
"format:check": "prettier --check .",
|
|
69
69
|
"duplication": "bun scripts/duplication.ts jscpd && bun scripts/duplication.ts cpd && bun scripts/duplication.ts fallow",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@rohal12/twee-ts": "^1.18.2",
|
|
88
|
-
"happy-dom": "
|
|
88
|
+
"happy-dom": ">=20.14.6"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|
|
91
91
|
"@rohal12/twee-ts": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"fake-indexeddb": "^6.2.5",
|
|
111
111
|
"fallow": "3.33.1",
|
|
112
112
|
"fast-check": "^4.10.2",
|
|
113
|
-
"happy-dom": "^
|
|
113
|
+
"happy-dom": "^21.0.3",
|
|
114
114
|
"husky": "^9.1.7",
|
|
115
115
|
"js-yaml": "^5.4.3",
|
|
116
116
|
"jscpd": "5.4.1",
|
package/src/js-lexer.ts
CHANGED
|
@@ -272,6 +272,8 @@ const SigilParser = class extends (Parser as unknown as Base) {
|
|
|
272
272
|
braceIsBlock(prevType: TokenType): boolean {
|
|
273
273
|
if (prevType === tt.colon && this.colonEndsTernary) return false;
|
|
274
274
|
if (prevType === tt.braceR && this.closedBlock) return true;
|
|
275
|
+
// acorn lets an expression follow `do`, but a `{` there is its body
|
|
276
|
+
if (prevType === tt._do) return true;
|
|
275
277
|
// A class's static initialization block: `static { … }`
|
|
276
278
|
if (prevType === tt.name && this.prevValue === 'static') return true;
|
|
277
279
|
// A statement ended by a line break (`p⏎{ }`): a block starts
|
package/types/headless.d.ts
CHANGED
package/types/play.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type {
|
|
|
2
2
|
Observation,
|
|
3
3
|
TranscriptEntry,
|
|
4
4
|
TranscriptOptions,
|
|
5
|
-
} from './headless';
|
|
6
|
-
import type { ObservedAction } from './index';
|
|
5
|
+
} from './headless.js';
|
|
6
|
+
import type { ObservedAction } from './index.js';
|
|
7
7
|
|
|
8
8
|
/** A story to play: compiled HTML, or a path to HTML, Twee or a project. */
|
|
9
9
|
export type StoryInput = { html: string } | { path: string };
|