@maple-dev/changesets 0.0.0-stage → 0.1.0
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/LICENSE +48 -0
- package/README.md +63 -2
- package/dist/bin.d.mts +1 -0
- package/dist/bin.mjs +7 -0
- package/dist/cli-_8EGJc1S.mjs +2566 -0
- package/dist/index.d.mts +255 -0
- package/dist/index.mjs +1 -0
- package/package.json +66 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Makisuo, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
The release planning, changelog and changeset parsing logic is ported from
|
|
26
|
+
Changesets (https://github.com/changesets/changesets), used under this license:
|
|
27
|
+
|
|
28
|
+
MIT License
|
|
29
|
+
|
|
30
|
+
Copyright (c) 2019 Ben Conolly
|
|
31
|
+
|
|
32
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
33
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
34
|
+
in the Software without restriction, including without limitation the rights
|
|
35
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
36
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
37
|
+
furnished to do so, subject to the following conditions:
|
|
38
|
+
|
|
39
|
+
The above copyright notice and this permission notice shall be included in all
|
|
40
|
+
copies or substantial portions of the Software.
|
|
41
|
+
|
|
42
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
43
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
44
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
45
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
46
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
47
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
48
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @maple-dev/changesets
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A drop-in for the parts of [`@changesets/cli`](https://github.com/changesets/changesets) 3.x that a
|
|
4
|
+
monorepo with its own publish script uses: `changeset add`, `changeset version` and
|
|
5
|
+
`changeset status`. Its only dependencies are `effect` and `@effect/platform-node`.
|
|
6
|
+
|
|
7
|
+
It reads and writes the same files: `.changeset/*.md`, `.changeset/config.json`, `package.json`
|
|
8
|
+
versions and internal ranges, and `CHANGELOG.md` in the `@changesets/cli/changelog` format. The
|
|
9
|
+
project's formatter then formats the changelogs (`format: "auto"` detection included).
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun add -d @maple-dev/changesets
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
changeset # interactive add (same as `changeset add`)
|
|
17
|
+
changeset --patch @scope/a,@scope/b --minor @scope/c -m "Summary"
|
|
18
|
+
changeset --empty
|
|
19
|
+
changeset version [--ignore <pkg>]
|
|
20
|
+
changeset status [--verbose] [--since <ref>] [--output <file>]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Compatibility
|
|
24
|
+
|
|
25
|
+
`src/differential.test.ts` runs every fixture in `src/__fixtures__/` and compares the files written,
|
|
26
|
+
the files deleted, the `status --output` JSON and the exit codes with what `@changesets/cli` 3.0.3
|
|
27
|
+
produced. One fixture is a snapshot of [Maple](https://github.com/MapleTechLabs/maple)'s
|
|
28
|
+
workspace. `src/frontmatter.test.ts` does the same for changeset parsing against `@changesets/parse`.
|
|
29
|
+
To re-record after changing a fixture:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bun add --cwd /tmp/changesets-ref @changesets/cli@3.0.3
|
|
33
|
+
CHANGESETS_CLI=/tmp/changesets-ref/node_modules/@changesets/cli/bin.js bun run record-reference
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[`changesets/action`](https://github.com/changesets/action) keeps working. With `version-script`
|
|
37
|
+
and `publish-script` set, it never runs the CLI. It reads `.changeset/` itself for
|
|
38
|
+
`has-changesets`, and reads the CHANGELOG entries for the PR body. This repository releases
|
|
39
|
+
itself that way (`.github/workflows/release.yml`).
|
|
40
|
+
|
|
41
|
+
## Not implemented
|
|
42
|
+
|
|
43
|
+
These fail with a clear error instead of doing something different:
|
|
44
|
+
|
|
45
|
+
- `init`, `publish`, `publish-plan`, `pack`, `pre`, `git-tag`/`tag`, and `version --snapshot`.
|
|
46
|
+
- Pre mode (`.changeset/pre.json`) and `commit` other than `false`.
|
|
47
|
+
- Changelog modules other than `@changesets/cli/changelog` (or `@changesets/changelog-git`), `false`,
|
|
48
|
+
or a path relative to `.changeset/`.
|
|
49
|
+
|
|
50
|
+
Known differences in what is accepted:
|
|
51
|
+
|
|
52
|
+
- Workspaces come from `package.json` `workspaces` next to a bun, yarn or npm lockfile.
|
|
53
|
+
`pnpm-workspace.yaml`, Lerna and Rush roots are not detected.
|
|
54
|
+
- Ranges use `effect/SemVerRange`, which rejects some loose node-semver forms (`v1.2.3`, `~>1.2`,
|
|
55
|
+
build metadata in a range). Such a range is left untouched, as changesets does for invalid ranges.
|
|
56
|
+
- Frontmatter is a YAML subset: block or flow mappings of plain or quoted scalars. Anchors, tags and
|
|
57
|
+
block scalars are reported as invalid YAML.
|
|
58
|
+
- `--patch a,a` names `a` once; changesets would write a duplicate key it cannot read back.
|
|
59
|
+
- `$VISUAL`/`$EDITOR` is split on whitespace and run without a shell.
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
MIT. The release planning, changelog and parsing logic is ported from Changesets (MIT); see
|
|
64
|
+
[LICENSE](./LICENSE).
|
package/dist/bin.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/bin.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { n as main, r as Changesets } from "./cli-_8EGJc1S.mjs";
|
|
3
|
+
import { Effect, Layer } from "effect";
|
|
4
|
+
import { NodeRuntime, NodeServices } from "@effect/platform-node";
|
|
5
|
+
// src/bin.ts
|
|
6
|
+
main.pipe(Effect.provide(Changesets.layer.pipe(Layer.provideMerge(NodeServices.layer))), NodeRuntime.runMain({ disableErrorReporting: true }));
|
|
7
|
+
export {};
|