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

Add workflows that publish to JSR #19

Merged
merged 15 commits into from
Nov 26, 2024
Merged

Add workflows that publish to JSR #19

merged 15 commits into from
Nov 26, 2024

Conversation

taras
Copy link
Member

@taras taras commented Oct 4, 2024

Motivation

We want our packages to be available from JSR and other repositories.

Approach

Configure to publish each public workspace to JSR using the a GitHub Workflow

task-buffer/task-buffer.test.ts Outdated Show resolved Hide resolved
task-buffer/task-buffer.ts Outdated Show resolved Hide resolved
@cowboyd
Copy link
Member

cowboyd commented Oct 5, 2024

@taras How is "when to publish" handled? In our other repos, we look for the appearance of a tag matching a pattern. Does JSR automatically handle idempotent publishes? I.e. if you publish twice with the same version number, it's just a no-op?

@taras
Copy link
Member Author

taras commented Oct 5, 2024

Does JSR automatically handle idempotent publishes?

Yes, it does. It's a no-op for already published versions.

@cowboyd
Copy link
Member

cowboyd commented Oct 6, 2024

Is it worth tagging each module? Or is the idea that we're a little more fast and loose.

@taras
Copy link
Member Author

taras commented Oct 6, 2024

Is it worth tagging each module?

can we tag individual modules?

@cowboyd
Copy link
Member

cowboyd commented Oct 6, 2024

Is it worth tagging each module?

can we tag individual modules?

We could if we wanted to, and since we'll be releasing different versions of different modules, it would be nice to have a task-buffer-v3.0.3 so that if you want to get to that particular point version, it's very easy to find.

Copy link
Member

@cowboyd cowboyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to publish on tag pushes, not main, right? I.e. cache-v1.0.0

@cowboyd
Copy link
Member

cowboyd commented Nov 24, 2024

Also, we need to replicate to npm somehow. That's going to be critical to providing access to the ecosystem. We don't have to do it in this PR, but we should figure out how it's going to work.

@taras
Copy link
Member Author

taras commented Nov 25, 2024

Might be able to use this to publish to NPM https://github.com/ryoppippi/mirror-jsr-to-npm

GitHub
a tool designed to mirror packages from JSR to NPM - ryoppippi/mirror-jsr-to-npm

@cowboyd
Copy link
Member

cowboyd commented Nov 25, 2024

Might be able to use this to publish to NPM https://github.com/ryoppippi/mirror-jsr-to-npm

GitHub**GitHub - ryoppippi/mirror-jsr-to-npm: a tool designed to mirror packages from JSR to NPM**a tool designed to mirror packages from JSR to NPM - ryoppippi/mirror-jsr-to-npm

This looks like almost exactly what we need. It has a tag publish, then to jsr, then to npm.

One thing though is that for node shims we may still need to have a DNT step....

GitHub
a tool designed to mirror packages from JSR to NPM - ryoppippi/mirror-jsr-to-npm

@cowboyd cowboyd merged commit 2154435 into main Nov 26, 2024
3 checks passed
@cowboyd cowboyd deleted the tm/publish-jsr branch November 26, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants