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

chore: avoid triple-slash reference directive #302

Merged
merged 3 commits into from
Nov 10, 2024
Merged

Conversation

aleclarson
Copy link
Member

@aleclarson aleclarson commented Nov 10, 2024

Tip

The owner of this PR can publish a preview release by commenting /publish in this PR. Afterwards, anyone can try it out by running pnpm add radashi@pr<PR_NUMBER>.

Summary

JSR doesn't allow a package to be published if it contains a triple-slash reference directive.

Evidenced by output of pnpm lint jsr:

[jsr] Checking for slow types in the public API...
[jsr] error[banned-triple-slash-directives]: triple slash directives that modify globals are not allowed
[jsr]  --> /Users/alec/dev/oss/radashi/src/async/AggregateError.ts:1:1
[jsr]   | 
[jsr] 1 | /// <reference lib="es2021.promise" />
[jsr]   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the triple slash directive
[jsr]   | 
[jsr]   = hint: remove the triple slash directive
[jsr] 
[jsr]   info: instead instruct the user of your package to specify these directives
[jsr]   info: or set their 'lib' compiler option appropriately
[jsr]   docs: https://jsr.io/go/banned-triple-slash-directives

Related issue, if any:

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed
  • Related benchmarks have been added or updated, if needed
  • Release notes in next-minor.md or next-major.md have been added, if needed

Does this PR introduce a breaking change?

No

@aleclarson aleclarson changed the title fix: avoid triple-slash reference directive chore: avoid triple-slash reference directive Nov 10, 2024
@aleclarson aleclarson merged commit 1db135b into main Nov 10, 2024
8 checks passed
@aleclarson aleclarson deleted the fix/jsr-error branch November 10, 2024 14:11
@radashi-bot
Copy link

A stable release 12.2.2 has been published to NPM. 🚀

To install:

See the changes

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