start-command 0.25.4 → 0.25.5
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/CHANGELOG.md +12 -0
- package/README.md +50 -0
- package/package.json +1 -1
- package/test/release-name.test.mjs +34 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# start-command
|
|
2
2
|
|
|
3
|
+
## 0.25.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 02527f9: Teach `scripts/create-github-release.mjs` and `scripts/format-github-release.mjs`
|
|
8
|
+
to honour the `--prefix` argument that both workflows already pass. JavaScript
|
|
9
|
+
releases are now tagged `js-v<version>` with title `[JavaScript] <version>`,
|
|
10
|
+
matching the `rust-v<version>` / `[Rust] <version>` convention needed for the
|
|
11
|
+
mono-repo. Extracted the tag/title construction into `scripts/release-name.mjs`
|
|
12
|
+
with unit tests in `test/release-name.test.mjs`. See `docs/case-studies/issue-108/`
|
|
13
|
+
for the full analysis.
|
|
14
|
+
|
|
3
15
|
## 0.25.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# start-command — JavaScript package
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/start-command)
|
|
4
|
+
[](https://www.npmjs.com/package/start-command)
|
|
5
|
+
[](https://github.com/link-foundation/start/actions/workflows/js.yml)
|
|
6
|
+
[](../LICENSE)
|
|
7
|
+
|
|
8
|
+
JavaScript/Bun implementation of the [`start-command`](../README.md) CLI (`$`).
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
bun install -g start-command
|
|
14
|
+
# or, via npm:
|
|
15
|
+
npm install -g start-command
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
$ ls -la
|
|
22
|
+
$ npm test
|
|
23
|
+
$ git status
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
See the project-wide [README](../README.md), [docs/USAGE.md](../docs/USAGE.md),
|
|
27
|
+
and [docs/PIPES.md](../docs/PIPES.md) for the full user-facing guide.
|
|
28
|
+
|
|
29
|
+
## Development
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
cd js
|
|
33
|
+
bun install
|
|
34
|
+
bun test
|
|
35
|
+
bun run lint
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Releases
|
|
39
|
+
|
|
40
|
+
JavaScript releases are tagged `js-v<version>` and published to both npm and
|
|
41
|
+
GitHub Releases. The release title carries the `[JavaScript]` prefix, e.g.
|
|
42
|
+
`[JavaScript] 0.25.4`, so JS and Rust releases can be told apart at a glance.
|
|
43
|
+
|
|
44
|
+
- **Release history**: https://github.com/link-foundation/start/releases?q=%5BJavaScript%5D
|
|
45
|
+
- **CHANGELOG**: [`CHANGELOG.md`](CHANGELOG.md) (per-package changelog generated
|
|
46
|
+
by [Changesets](https://github.com/changesets/changesets))
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
Released into the public domain under the [Unlicense](../LICENSE).
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { releaseName, releaseTag } from '../../scripts/release-name.mjs';
|
|
3
|
+
|
|
4
|
+
describe('releaseTag', () => {
|
|
5
|
+
it('uses plain "v${version}" when no prefix is given', () => {
|
|
6
|
+
expect(releaseTag('0.25.4')).toBe('v0.25.4');
|
|
7
|
+
expect(releaseTag('0.25.4', '')).toBe('v0.25.4');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('prepends known language prefixes', () => {
|
|
11
|
+
expect(releaseTag('0.25.4', 'js-')).toBe('js-v0.25.4');
|
|
12
|
+
expect(releaseTag('0.14.0', 'rust-')).toBe('rust-v0.14.0');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('passes arbitrary prefixes through', () => {
|
|
16
|
+
expect(releaseTag('1.0.0', 'api-')).toBe('api-v1.0.0');
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
describe('releaseName', () => {
|
|
21
|
+
it('returns bare version when prefix is empty (preserves pre-issue-108 behaviour)', () => {
|
|
22
|
+
expect(releaseName('0.25.4')).toBe('0.25.4');
|
|
23
|
+
expect(releaseName('0.25.4', '')).toBe('0.25.4');
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('decorates known language prefixes with human titles', () => {
|
|
27
|
+
expect(releaseName('0.25.4', 'js-')).toBe('[JavaScript] 0.25.4');
|
|
28
|
+
expect(releaseName('0.14.0', 'rust-')).toBe('[Rust] 0.14.0');
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('falls back to "${prefix}${version}" for unknown prefixes', () => {
|
|
32
|
+
expect(releaseName('1.0.0', 'api-')).toBe('api-1.0.0');
|
|
33
|
+
});
|
|
34
|
+
});
|