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 releases to JSR #291

Merged
merged 2 commits into from
Jul 2, 2024
Merged

add releases to JSR #291

merged 2 commits into from
Jul 2, 2024

Conversation

josh-hemphill
Copy link
Contributor

@josh-hemphill josh-hemphill commented Jun 11, 2024

Adding a step in the release pipeline to update a jsr.json when creating a new release version, and then release to JSR if npm release succeeded.

Just tried shortening the update scripts, I could just put it inline in the scripts if you prefer:

{
    "postversion": "node -e \"let r=require;r('fs').writeFileSync('jsr.json', JSON.stringify({...r('./jsr.json'),version: r('./package.json').version},null, 2)+'\\n');\"",
}

The only other step to be able to release to JSR would be registering the package scope/name and auth on the first upload.

closes #290

@@ -34,8 +34,8 @@ export class Eta {
renderStringAsync = renderStringAsync;

filepathCache: Record<string, string> = {};
templatesSync = new Cacher<TemplateFunction>({});
templatesAsync = new Cacher<TemplateFunction>({});
templatesSync: Cacher<TemplateFunction> = new Cacher<TemplateFunction>({});
Copy link
Contributor

Choose a reason for hiding this comment

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

These annotations are useless thanks to TypeScript type inference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, JSR complains though; it won't generate docs for types that take too many cycles to resolve; running the dry-run it said to add explicit types for those interfaces to enable auto-docs.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, now I understand 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any speedup is probably imperceptible on these in any non-constrained system, but I figured it wouldn't hurt to add them.

@nebrelbug nebrelbug merged commit b0e2c30 into eta-dev:main Jul 2, 2024
1 of 2 checks passed
@nebrelbug
Copy link
Collaborator

@josh-hemphill thanks so much for implementing this! I just merged and published, so https://jsr.io/@eta-dev/[email protected] is live!

@josh-hemphill
Copy link
Contributor Author

Awesome! Thanks!

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.

Publish to JSR?
3 participants