@liminis/editor 0.1.0-rc.2 → 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/README.md CHANGED
@@ -28,16 +28,14 @@ travelled with the code, are recorded in [`docs/provenance.md`](./docs/provenanc
28
28
 
29
29
  ## Install
30
30
 
31
- > **This package is published as a prerelease.** `0.1.0-rc.1` is on npm under the
32
- > `next` tag, so `pnpm add @liminis/editor` resolves nothing — ask for the tag:
33
- >
34
- > ```bash
35
- > pnpm add @liminis/editor@next
36
- > ```
37
- >
38
- > The prerelease exists to prove the registry install path, which nothing had
39
- > exercised: both consuming applications resolved this package locally. `latest`
40
- > stays unset until `0.1.0`.
31
+ ```bash
32
+ pnpm add @liminis/editor
33
+ ```
34
+
35
+ > **This is `0.x`.** Minor versions may contain breaking changes; patch versions
36
+ > will not. The seven declared subpath exports are the public API — anything
37
+ > reachable by a deeper path is private and may move without notice. Breaking
38
+ > changes are listed in the changelog with a migration note.
41
39
 
42
40
  React and Lexical are **peer dependencies**, so your app resolves exactly one
43
41
  copy of each. Two React copies produce `Invalid hook call`; two Lexical copies
@@ -265,7 +263,7 @@ inert).
265
263
 
266
264
  ## Consuming it
267
265
 
268
- The registry is now the normal route (`pnpm add @liminis/editor@next`). The
266
+ The registry is the normal route (`pnpm add @liminis/editor`). The
269
267
  **packed tarball** below remains the way to consume an unreleased change — a
270
268
  local build, or a commit that has not been tagged:
271
269
 
@@ -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 rest of this ADR is
100
- > unaffected: `publishConfig` and the non-bundling `tsc` emit stand as decided.
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,72 +1,56 @@
1
1
  {
2
2
  "name": "@liminis/editor",
3
- "version": "0.1.0-rc.2",
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",
7
+ "keywords": [
8
+ "markdown",
9
+ "markdown-editor",
10
+ "wysiwyg",
11
+ "rich-text",
12
+ "editor",
13
+ "lexical",
14
+ "react",
15
+ "mdast",
16
+ "round-trip",
17
+ "annotations"
18
+ ],
7
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.",
8
20
  "packageManager": "pnpm@10.33.0",
9
21
  "type": "module",
10
- "main": "./src/index.ts",
11
- "types": "./src/index.ts",
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",
12
25
  "exports": {
13
26
  ".": {
14
- "types": "./src/index.ts",
15
- "default": "./src/index.ts"
27
+ "types": "./dist/index.d.ts",
28
+ "default": "./dist/index.js"
16
29
  },
17
30
  "./markdown": {
18
- "types": "./src/markdown.ts",
19
- "default": "./src/markdown.ts"
31
+ "types": "./dist/markdown.d.ts",
32
+ "default": "./dist/markdown.js"
20
33
  },
21
34
  "./annotations": {
22
- "types": "./src/annotations.ts",
23
- "default": "./src/annotations.ts"
35
+ "types": "./dist/annotations.d.ts",
36
+ "default": "./dist/annotations.js"
24
37
  },
25
38
  "./headless": {
26
- "types": "./src/headless.ts",
27
- "default": "./src/headless.ts"
39
+ "types": "./dist/headless.d.ts",
40
+ "default": "./dist/headless.js"
28
41
  },
29
42
  "./contract": {
30
- "types": "./src/contract.ts",
31
- "default": "./src/contract.ts"
43
+ "types": "./dist/contract.d.ts",
44
+ "default": "./dist/contract.js"
32
45
  },
33
46
  "./nodes": {
34
- "types": "./src/nodes.ts",
35
- "default": "./src/nodes.ts"
47
+ "types": "./dist/nodes.d.ts",
48
+ "default": "./dist/nodes.js"
36
49
  },
37
- "./styles.css": "./src/styles.css"
50
+ "./styles.css": "./dist/styles.css"
38
51
  },
39
52
  "publishConfig": {
40
- "access": "public",
41
- "main": "./dist/index.js",
42
- "types": "./dist/index.d.ts",
43
- "exports": {
44
- ".": {
45
- "types": "./dist/index.d.ts",
46
- "default": "./dist/index.js"
47
- },
48
- "./markdown": {
49
- "types": "./dist/markdown.d.ts",
50
- "default": "./dist/markdown.js"
51
- },
52
- "./annotations": {
53
- "types": "./dist/annotations.d.ts",
54
- "default": "./dist/annotations.js"
55
- },
56
- "./headless": {
57
- "types": "./dist/headless.d.ts",
58
- "default": "./dist/headless.js"
59
- },
60
- "./contract": {
61
- "types": "./dist/contract.d.ts",
62
- "default": "./dist/contract.js"
63
- },
64
- "./nodes": {
65
- "types": "./dist/nodes.d.ts",
66
- "default": "./dist/nodes.js"
67
- },
68
- "./styles.css": "./dist/styles.css"
69
- }
53
+ "access": "public"
70
54
  },
71
55
  "files": [
72
56
  "dist",