-
Notifications
You must be signed in to change notification settings - Fork 147
Reduce size of types-registry #429
Conversation
src/publish-registry.ts
Outdated
| // 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); |
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.
you do not need the second undefined parameter either.
|
Could we just leave it as |
| const info = await fetchNpmInfo(typing.fullEscapedNpmName); | ||
| entries[typing.name] = info["dist-tags"]; | ||
| const tags = info["dist-tags"]; | ||
| if (tags) { |
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.
This should always be defined.
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.
It wasn't when I was testing it. not sure why.
|
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 |
Port #429 to production
#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.