embroider-build / release-plan Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
right now the default is quite large and is talking about the merge commit not the version, I just want to improve it
https://github.blog/2023-04-19-introducing-npm-package-provenance/
This would be implemented in exactly the same way that we added #38 so it would be passed through the publish command ๐
So I was evaluating using this for releasing projects over at the @ember-tooling org. Most of what we need to publish are VSCode extensions though and right now npm is a baked in assumption of release plan.
One idea I came up with was having some way for a project to supply a custom publishing strategy by passing in a PublishStrategy class that would potentially look something like this.
import { PublishStrategy } from 'release-plan';
export default class VSCodeStrategy extends PublishStrategy {
async doesVersionExist() {
// do thing to determine version exists
if (itExists) {
return true;
}
return false;
}
async publish() {
// do your publish steps
if (isPublished) {
return true;
}
return false;
}
}
I think this would work by running a command similar to this
$ release-plan publish --strategy ./publish/vscode.js
Popular strategies could potentially be merged back upstream and named so you can do things like this
$ release-plan publish --strategy vscode
$ release-plan publish --strategy npm
$ release-plan publish --strategy dockerhub
I'd like to take a stab at a proof of concept on this but creating this issue initially for feedback or other ideas.
Extra context https://github.com/orgs/ember-tooling/discussions/1
https://pnpm.io/npmrc#shared-workspace-lockfile
The reason I needed this was for extreme isolation between workspaces.
The actual problem is with @ef4/lerna-changelog
, but I wonder if we should just move that code into release-plan?
Here is the code that errors, (due to not-quite-json)
โฏ pnpm m ls --json --depth=-1
[
{
"path": "/home/nvp/Development/NullVoxPopuli/ember-resources-2",
"private": true
}
]
[
{
"name": "@nullvoxpopuli/estimate-bytes",
"path": "/home/nvp/Development/NullVoxPopuli/ember-resources-2/dev/estimate-bytes",
"private": true
}
]
[
{
"name": "docs",
"version": "0.0.0",
"path": "/home/nvp/Development/NullVoxPopuli/ember-resources-2/docs",
"private": true
}
]
[
{
"name": "ember-resources",
"version": "6.5.0",
"path": "/home/nvp/Development/NullVoxPopuli/ember-resources-2/ember-resources",
"private": false
}
]
[
{
"name": "test-app",
"version": "0.0.0",
"path": "/home/nvp/Development/NullVoxPopuli/ember-resources-2/test-app",
"private": true
}
]
[
{
"name": "test-app-definitely-typed",
"version": "0.0.0",
"path": "/home/nvp/Development/NullVoxPopuli/ember-resources-2/test-app-definitely-typed",
"private": true
}
]
from:
โ File: /home/nvp/Development/NullVoxPopuli/ember-resources-2/node_modules/.pnpm/@[email protected]/node_modules/@ef4/lerna-changelog/lib/configuration.js
As it turns out, this is blocking the release of ember-resources@v7 ๐
https://github.com/NullVoxPopuli/ember-resources/actions/runs/7482171149/job/20365200936
#35 introduces a workaround for this repo because pnpm is acting badly. It would be nice to fix this before 1.0 but at the very least we should document it somewhere ๐คท
I added a hack in #5 that worked around the fact that this was originally designed to work with a monorepo. it's a totally unnecessary command since we can probably figure out if we're in a monorepo automatically
We should remove the need for this command before 1.0
release-plan was originally extracted from embroider to manage the release of a complicated monorepo tree of dependencies.
Embroider also has another feature, "unstable releases" that was not managed by release-plan
because it pre-dates the creation of this package. The unstable releases always just do a next patch version and add -unstable.<sha>
to the end but it would be nice to add this functionality to release-plan so it would actually be a major if the next release would be a major ๐
Here is the code for the unstable release: https://github.com/embroider-build/embroider/tree/main/test-packages/unstable-release
Wondering how to use this with prereleases. Thanks in advance!
This keeps coming up, so I made a table:
excerpt from: https://github.com/orgs/ember-tooling/discussions/1#discussioncomment-8447957
From reading the repo it seems like a bunch of manual steps similar to release-it?
Readme may need updating then... because nothing is manual. Release-it is manual by comparison, as is changesets.
cc @mansona
But the way it works:
release-plan | release-it (requires computer) | changesets (requires computer) |
---|---|---|
add a label to a PR | same | have the repo cloned |
merge the PR | same | add the remote of the PR-submitter to your local git |
checkout the branch | ||
run pnpm changeset |
||
write something about the change | ||
push it back up to the PR-submitter's branch | ||
ensure the PR title is what you want in the changelog | same | |
have the repo cloned | ||
update / sync repo locally | ||
run npx release -it |
||
automation creates a preview PR | same | |
merging that preview PR does the actual release | same |
Access:
release-plan | release-it | changesets | |
---|---|---|---|
NPM_TOKEN | only ci | local | only ci |
GH_TOKEN | only ci | local | only ci |
number of steps:
For libraries, it may be beneficial to include code snippets or migration paths, tips, examples, etc in the changelog.
With changesets, this was the main draw -- with release-it, release-plan / everything else, you have to manage that level of detail separately -- but I think it'd be good to have some sort of opt-in... maybe via label (changelog-use-description) or something to include this level of details.
otherwise, you have to remember all that context during changelog creation time as you edit the preview PR before merge.
thoughts?
I'm seeing in the logs:
Error: Command failed with exit code 128: git describe --abbrev=0 --tags
fatal: No names found, cannot describe anything.
from: https://github.com/NullVoxPopuli/ember-eslint-parser/actions/runs/7255082401/job/19765027127
which does match what I see locally:
โฏ git describe --abbrev=0 --tags
fatal: No names found, cannot describe anything.
So, setup-action-pnpm is a meta action, which doesn't really do anything special other than try to interpret the package.json correctly.
When I tried to setup release-plan on ember-sortable, I was getting errors, because it assumed pnpm 8 -- and like, some file should teh source of truth for that sort of thing (package.json#packageManager is a good such source)
thoughts?
here is the then-resulting upgrade to pnpm-8 to fix release-plan: adopted-ember-addons/ember-sortable#534
(note: volta not used on CI, only some folks' machines)
Here is a preview of what release-plan using wyvox/setup-action-pnpm would look like:
adopted-ember-addons/ember-sortable#535
I think one potential blocking feature that would need to be implemented is a fallback for node version lookup (in action/setup-node) -- I've configured it to look in package.json -- but I don't (yet) know if action/setup-node will continue looking other places if not found -- for example -- in the embroider repo, use-node-version
is specified in the .npmrc
.
We'll need to PR to here: https://github.com/actions/setup-node/blob/b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8/src/main.ts#L82
to add support for the .npmrc
property that pnpm is looking for
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.