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

Invalidate lockfile when import map package requirements change #21374

Closed
dsherret opened this issue Nov 28, 2023 · 1 comment
Closed

Invalidate lockfile when import map package requirements change #21374

dsherret opened this issue Nov 28, 2023 · 1 comment
Labels
node compat suggestion suggestions for new features (yet to be agreed)

Comments

@dsherret
Copy link
Member

dsherret commented Nov 28, 2023

It would by nice to give package requirements in a deno.json/import map the ability to invalidate the lockfile when they change. See #20868 for why.

This would require:

  • Storing the package requirements found in the import map in the lockfile.

When the lockfile and import map differ, then:

  1. If a package package requirement is added, it will invalidate the lockfile, keep the previous package requirements, and add the new one.
  2. If a package package requirement is removed, it will invalidate the lockfile, keep the other requirements, and remove the requirement that was removed along with all its dependencies from the lockfile (part of the lockfile invalidation).
    • This assumes the package requirement is not used in a module directly elsewhere, which I think is ok. It will be added back automatically if so.
  3. If a package requirement is changed, it will do both of the above steps.
@dsherret dsherret added suggestion suggestions for new features (yet to be agreed) node compat labels Nov 28, 2023
@dsherret dsherret changed the title Invalidate lockfile when import map npm specifier requirements changes Invalidate lockfile when import map package requirements change Nov 28, 2023
@dsherret
Copy link
Member Author

Oh, this was done in #22004

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node compat suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

1 participant