Skip to content
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Conversation

@uniqueiniquity
Copy link
Contributor

#425 increased the number of lines in types-registry by a factor of 10 since a version was listed for every version of typescript (plus latest) for every package.

This change removes all whitespace from the registry and only lists tags that differ from the latest version.

@uniqueiniquity
Copy link
Contributor Author

@mhegazy @Andy-MS could you take a look?

// Don't include not-needed packages in the registry.
const typings = await AllPackages.readTypings();
const registry = JSON.stringify(await generateRegistry(typings), undefined, 4);
const registry = JSON.stringify(await generateRegistry(typings), undefined);
Copy link
Contributor

Choose a reason for hiding this comment

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

you do not need the second undefined parameter either.

@ghost
Copy link

ghost commented Jan 25, 2018

Could we just leave it as 1 if the latest tag is the only one? npm install installs the latest by default without needing a version number. Also, we don't update types-registry at every package update, just on new packages, so it would get out of date.

@ghost ghost merged commit ff07bcc into microsoft:master Jan 25, 2018
const info = await fetchNpmInfo(typing.fullEscapedNpmName);
entries[typing.name] = info["dist-tags"];
const tags = info["dist-tags"];
if (tags) {
Copy link

Choose a reason for hiding this comment

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

This should always be defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It wasn't when I was testing it. not sure why.

@uniqueiniquity
Copy link
Contributor Author

I use the version in the registry to decide in the installer whether or not I need to update the installed copy. So I don't think keeping the 1 is possible.

uniqueiniquity added a commit that referenced this pull request Jan 30, 2018
@uniqueiniquity uniqueiniquity deleted the compressDistTags branch March 28, 2018 19:57
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants