@liminis/editor 0.1.0 → 0.1.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/docs/decisions/adr-078.md +37 -2
- package/package.json +18 -46
|
@@ -86,6 +86,40 @@ that exists but contains no class-bearing source.
|
|
|
86
86
|
`publishConfig` makes that whole class of problem not arise. The cost is that
|
|
87
87
|
the built path is exercised only in CI — which is what SC-005 mandates anyway.
|
|
88
88
|
|
|
89
|
+
> **Amended 2026-08-16 — the `publishConfig` mechanism is reversed as of
|
|
90
|
+
> 0.1.1.** It does not work, and it shipped a broken `0.1.0`.
|
|
91
|
+
>
|
|
92
|
+
> `publishConfig` **manifest-field** overrides (`main`, `types`, `exports`) are
|
|
93
|
+
> a pnpm and yarn feature. npm honours `publishConfig` only for *config* values
|
|
94
|
+
> — `access`, `registry`, `tag` — and ignores field overrides entirely.
|
|
95
|
+
> `.github/workflows/publish.yml` publishes with `npm publish`, so the swap to
|
|
96
|
+
> `dist/` never happened: `0.1.0` went to the registry declaring
|
|
97
|
+
> `"main": "./src/index.ts"` while `files` shipped only `dist/`. Every entry
|
|
98
|
+
> point resolved to a file that was not in the tarball, and the package could
|
|
99
|
+
> not be imported at all.
|
|
100
|
+
>
|
|
101
|
+
> This survived a verification pass that was, in itself, correct and thorough.
|
|
102
|
+
> `scripts/verify-package.mjs` asserted that the packed manifest pointed at
|
|
103
|
+
> `dist/` and that each target existed — but it packed with **pnpm** while the
|
|
104
|
+
> release packed with **npm**. It validated a tarball no consumer would ever
|
|
105
|
+
> receive. The lesson is narrower and more useful than "test more": *verify the
|
|
106
|
+
> artifact the release actually produces.*
|
|
107
|
+
>
|
|
108
|
+
> The entry points now live in the checked-in manifest as `dist/` paths, with
|
|
109
|
+
> no pack-time rewriting by anyone, and `verify-package.mjs` packs with npm and
|
|
110
|
+
> additionally asserts the packed entry points are byte-identical to the
|
|
111
|
+
> checked-in ones — so a client that rewrites them fails too.
|
|
112
|
+
>
|
|
113
|
+
> **What this costs is exactly what the decision above was buying.** An
|
|
114
|
+
> in-workspace consumer resolving `@liminis/editor` no longer lands on raw
|
|
115
|
+
> TypeScript, so the Tailwind `@source` directive and the bundler
|
|
116
|
+
> externalization exclusion described above must name the installed package
|
|
117
|
+
> rather than a sibling `src/` tree. That cost is now acceptable because the
|
|
118
|
+
> monorepo copy is being removed in favour of the published package
|
|
119
|
+
> (verveguy/liminis#1009) — the in-workspace consumer this protected is going
|
|
120
|
+
> away. The rest of the decision — the non-bundling `tsc` emit, `sideEffects`,
|
|
121
|
+
> the vendored wiki-link fix — is unaffected.
|
|
122
|
+
|
|
89
123
|
`private: true` is kept: publishing is out of scope for #940, and `private`
|
|
90
124
|
blocks `publish` without blocking `pack`.
|
|
91
125
|
|
|
@@ -96,8 +130,9 @@ blocks `publish` without blocking `pack`.
|
|
|
96
130
|
> package is private. The guard is now `prepublishOnly` →
|
|
97
131
|
> `scripts/guard-publish.mjs`, which refuses unless `LIMINIS_ALLOW_PUBLISH=1`
|
|
98
132
|
> is set — a script rather than a flag precisely so that it can be tested, and
|
|
99
|
-
> it is, in `tests/package-manifest-contract.test.ts`. The
|
|
100
|
-
>
|
|
133
|
+
> it is, in `tests/package-manifest-contract.test.ts`. The non-bundling `tsc`
|
|
134
|
+
> emit stands as decided. (This amendment originally said `publishConfig` stood
|
|
135
|
+
> too. It does not — see the amendment above it, added later the same day.)
|
|
101
136
|
|
|
102
137
|
### 3. `mdast-util-wiki-link` is vendored, not merely un-patched.
|
|
103
138
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liminis/editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"//publishing": "Publishing is deliberate, never incidental. `private: true` was this package's guard until verveguy/liminis-editor#39 took the publish decision; it is gone because that decision was taken, not because it was tidied away. The guard is now `prepublishOnly` -> scripts/guard-publish.mjs, which refuses unless LIMINIS_ALLOW_PUBLISH=1 is set explicitly. That variable is set at step scope in .github/workflows/publish.yml and nowhere else, so a release is the only path that publishes. Note that `npm publish --dry-run` does NOT report a private package as blocked (npm 10.8.2), which is why the guard is a script rather than a flag.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Lexical-based markdown WYSIWYG editor with mdast round-trip and a host-injection seam",
|
|
@@ -19,66 +19,38 @@
|
|
|
19
19
|
"//packageManager": "Not cosmetic. This field used to live in the monorepo root manifest and did not travel with the package, so `pnpm/action-setup` had no version to read and CI failed before installing anything. It is also what pins the pnpm that resolves the lockfile.",
|
|
20
20
|
"packageManager": "pnpm@10.33.0",
|
|
21
21
|
"type": "module",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"//entrypoints": "These point at dist/ here, in the checked-in manifest, and must stay that way. They lived under `publishConfig` until 0.1.1 so that in-workspace consumers could resolve raw TypeScript, and that silently shipped a broken 0.1.0: `publishConfig` manifest-field overrides (main/types/exports) are a pnpm and yarn feature, and npm honours `publishConfig` only for config values like access, registry and tag. `npm publish` therefore published src/ paths while `files` shipped only dist/, so every entry point resolved to a file that was not in the tarball. What is published is now exactly what is written here, and scripts/verify-package.mjs packs with the same client that publishes so the two cannot diverge again. See docs/decisions/adr-078.md.",
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
24
25
|
"exports": {
|
|
25
26
|
".": {
|
|
26
|
-
"types": "./
|
|
27
|
-
"default": "./
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"default": "./dist/index.js"
|
|
28
29
|
},
|
|
29
30
|
"./markdown": {
|
|
30
|
-
"types": "./
|
|
31
|
-
"default": "./
|
|
31
|
+
"types": "./dist/markdown.d.ts",
|
|
32
|
+
"default": "./dist/markdown.js"
|
|
32
33
|
},
|
|
33
34
|
"./annotations": {
|
|
34
|
-
"types": "./
|
|
35
|
-
"default": "./
|
|
35
|
+
"types": "./dist/annotations.d.ts",
|
|
36
|
+
"default": "./dist/annotations.js"
|
|
36
37
|
},
|
|
37
38
|
"./headless": {
|
|
38
|
-
"types": "./
|
|
39
|
-
"default": "./
|
|
39
|
+
"types": "./dist/headless.d.ts",
|
|
40
|
+
"default": "./dist/headless.js"
|
|
40
41
|
},
|
|
41
42
|
"./contract": {
|
|
42
|
-
"types": "./
|
|
43
|
-
"default": "./
|
|
43
|
+
"types": "./dist/contract.d.ts",
|
|
44
|
+
"default": "./dist/contract.js"
|
|
44
45
|
},
|
|
45
46
|
"./nodes": {
|
|
46
|
-
"types": "./
|
|
47
|
-
"default": "./
|
|
47
|
+
"types": "./dist/nodes.d.ts",
|
|
48
|
+
"default": "./dist/nodes.js"
|
|
48
49
|
},
|
|
49
|
-
"./styles.css": "./
|
|
50
|
+
"./styles.css": "./dist/styles.css"
|
|
50
51
|
},
|
|
51
52
|
"publishConfig": {
|
|
52
|
-
"access": "public"
|
|
53
|
-
"main": "./dist/index.js",
|
|
54
|
-
"types": "./dist/index.d.ts",
|
|
55
|
-
"exports": {
|
|
56
|
-
".": {
|
|
57
|
-
"types": "./dist/index.d.ts",
|
|
58
|
-
"default": "./dist/index.js"
|
|
59
|
-
},
|
|
60
|
-
"./markdown": {
|
|
61
|
-
"types": "./dist/markdown.d.ts",
|
|
62
|
-
"default": "./dist/markdown.js"
|
|
63
|
-
},
|
|
64
|
-
"./annotations": {
|
|
65
|
-
"types": "./dist/annotations.d.ts",
|
|
66
|
-
"default": "./dist/annotations.js"
|
|
67
|
-
},
|
|
68
|
-
"./headless": {
|
|
69
|
-
"types": "./dist/headless.d.ts",
|
|
70
|
-
"default": "./dist/headless.js"
|
|
71
|
-
},
|
|
72
|
-
"./contract": {
|
|
73
|
-
"types": "./dist/contract.d.ts",
|
|
74
|
-
"default": "./dist/contract.js"
|
|
75
|
-
},
|
|
76
|
-
"./nodes": {
|
|
77
|
-
"types": "./dist/nodes.d.ts",
|
|
78
|
-
"default": "./dist/nodes.js"
|
|
79
|
-
},
|
|
80
|
-
"./styles.css": "./dist/styles.css"
|
|
81
|
-
}
|
|
53
|
+
"access": "public"
|
|
82
54
|
},
|
|
83
55
|
"files": [
|
|
84
56
|
"dist",
|