-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Add use cache directives from Next.js 16 #20938
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
base: main
Are you sure you want to change the base?
Conversation
.vscode/settings.json
Outdated
| "editor.suggest.matchOnWordStartOnly": false, | ||
| "editor.formatOnSave": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you committed this by mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i missed it. thanks
5b7c2d0 to
c4f6606
Compare
asgerf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
| * ``` | ||
| */ | ||
| class UseCacheDirective extends KnownDirective { | ||
| UseCacheDirective() { this.getDirectiveText().regexpMatch("use cache(: (remote|private))?") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| UseCacheDirective() { this.getDirectiveText().regexpMatch("use cache(: (remote|private))?") } | |
| UseCacheDirective() { this.getDirectiveText().regexpMatch("use cache(:.*)?") } |
It seems better to match anything here so we don't have to come back and update it if more cache modes are added in the future.
Add
use cachedirectives(includinguse cache: remote,use cache: private) for Next.js 16