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

refactor: run registry resolution in mkDenoDir #7

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

nekowinston
Copy link
Owner

No description provided.

Copy link
Owner Author

@nekowinston nekowinston left a comment

Choose a reason for hiding this comment

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

Ideally I'd also like to get rid of this

packageJson = lib.importJSON "${unpacked}/package.json";
registryData = builtins.toJSON {
dist-tags.latest = version;
name = pkgName;
versions = {
${version} = {
dependencies = packageJson.dependencies or {};
optionalDependencies = packageJson.optionalDependencies or {};
peerDependencies = packageJson.peerDependencies or {};
peerDependenciesMeta = packageJson.peerDependenciesMeta or {};
bin = null;
os = packageJson.os or [];
cpu = packageJson.cpu or [];
dist = {
integrity = data.integrity;
shasum = builtins.hashFile "sha1" tarball;
tarball = tarballUrl;
};
inherit version;
};
};
};

And handle it in the symlinkJoin postBuild as well, since it would reduce IFD.
Don't really have an exact plan how to do it yet 🤔

Edit: postponed for a separate PR

@nekowinston nekowinston merged commit 63cd717 into main Dec 18, 2023
1 check passed
@nekowinston nekowinston deleted the refactor/run-registry-resolution-in-mkDenoDir branch December 18, 2023 20:09
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.

1 participant