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

Cache bust npm specifiers more aggressively #16901

Closed
oscarotero opened this issue Dec 2, 2022 · 4 comments · Fixed by #18636
Closed

Cache bust npm specifiers more aggressively #16901

oscarotero opened this issue Dec 2, 2022 · 4 comments · Fixed by #18636

Comments

@oscarotero
Copy link
Contributor

Everytime I want to update any NPM package to the latest version, I get the following error:

Could not find npm package 'lightningcss-wasm' matching 1.17.1. Try retrieving the latest npm package information by running with --reload

Is there any way to update it without need to add the --reload flag? It's very unconvenient for Lume users.

@dsherret
Copy link
Member

dsherret commented Dec 2, 2022

We've talked about cache busting when someone uses a new npm specifier. Would that work in this scenario?

@oscarotero
Copy link
Contributor Author

If I understand correctly, if I'm using npm:[email protected] and then change it to npm:[email protected], it's considered a new npm specifier, so it doesn't use the old cache, right? In that case, I guess it shoud work.

@dsherret
Copy link
Member

dsherret commented Dec 2, 2022

Yeah, in that scenario it would requery npm for the latest package information for everything (just package information and would not redownload package tarballs).

@dsherret
Copy link
Member

dsherret commented Apr 7, 2023

#18622 should help a lot with this, but it doesn't fully solve the problem.

dsherret added a commit that referenced this issue Apr 7, 2023
…on not found (#18622)

This reloads an npm package's dependency's information when a
version/version req/tag is not found.

This PR applies only to dependencies of npm packages. It does NOT yet
cause npm specifiers to have their dependency information cache busted.
That requires a different solution, but this should help cache bust in
more scenarios.

Part of #16901, but doesn't close it yet
dsherret added a commit that referenced this issue Apr 12, 2023
Part 1: #18622 
Part 2: This PR

Closes #16901

---------

Co-authored-by: Luca Casonato <[email protected]>
levex pushed a commit that referenced this issue Apr 12, 2023
…on not found (#18622)

This reloads an npm package's dependency's information when a
version/version req/tag is not found.

This PR applies only to dependencies of npm packages. It does NOT yet
cause npm specifiers to have their dependency information cache busted.
That requires a different solution, but this should help cache bust in
more scenarios.

Part of #16901, but doesn't close it yet
levex pushed a commit that referenced this issue Apr 12, 2023
Part 1: #18622 
Part 2: This PR

Closes #16901

---------

Co-authored-by: Luca Casonato <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants