Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose a release preamble #1415

Merged
merged 3 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/.PREAMBLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This version of skuba should not be a large upgrade effort for most use-cases, but does contains some large changes:

- Major upgrades to the linting and patching systems, which may result in some code changes on version upgrades.
To make upgrades easy now and going forward, we recommend setting up [GitHub autofixes](https://seek-oss.github.io/skuba/docs/deep-dives/github.html#github-autofixes).
- New projects will now be initialised with `pnpm`.
A future release of `skuba` will likely transition existing projects to `pnpm` as well.
AaronMoat marked this conversation as resolved.
Show resolved Hide resolved

Continue reading for more details on these changes and other improvements in this release.
16 changes: 16 additions & 0 deletions .changeset/inject.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Hack to add a preamble from .changeset/.PREAMBLE.md to the CHANGELOG.md for a given release

const fs = require('fs');

const PREAMBLE_PATH = '.changeset/.PREAMBLE.md';
const CHANGELOG_PATH = 'CHANGELOG.md';

if (fs.existsSync(PREAMBLE_PATH) && fs.existsSync(CHANGELOG_PATH)) {
const preamble = fs.readFileSync(PREAMBLE_PATH, 'utf8');
const changeset = fs.readFileSync(CHANGELOG_PATH, 'utf8');

const lines = changeset.split('\n');
lines.splice(3, 0, preamble);
fs.writeFileSync(CHANGELOG_PATH, lines.join('\n'));
fs.rmSync(PREAMBLE_PATH);
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"release": "pnpm run --silent build && changeset publish",
"skuba": "pnpm run --silent build && pnpm run --silent skuba:exec",
"skuba:exec": "node --env-file=.env lib/skuba",
"stage": "changeset version && pnpm run format",
"stage": "changeset version && node ./.changeset/inject.js && pnpm run format",
"test": "pnpm run --silent skuba test --selectProjects unit",
"test:ci": "pnpm run --silent skuba test --runInBand",
"test:int": "pnpm run --silent skuba test --runInBand --selectProjects integration",
Expand Down
Loading