Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Add new packages to allowed names in npm banned types #350

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peterblazejewicz
Copy link

@peterblazejewicz peterblazejewicz commented Nov 21, 2021

The assertion is not a rule, so it cannot be bypassed in DT config.

  • 'download-git-repo'
  • 'download-package-tarball'

Both are published to NPM registry already.

Required for:
DefinitelyTyped/DefinitelyTyped#56874
DefinitelyTyped/DefinitelyTyped#56875

Thanks!

/cc @LinqLover

The assertion is not a rule, so it cannot be bypassed in DT config.
- 'download-git-repo'
- 'download-package-tarball'

Both are published to NPM registry already.

Required for:
DefinitelyTyped/DefinitelyTyped#56874
DefinitelyTyped/DefinitelyTyped#56875

Thanks!

/cc @LinqLover
@peterblazejewicz peterblazejewicz changed the title Add 'download-git-repo' to allowed names in npm banned types Add new packages to allowed names in npm banned types Nov 22, 2021
@sandersn
Copy link
Member

sandersn commented Dec 2, 2021

The problem is that the @types/ versions are not published to NPM already, and NPM will forbid the DT publisher from doing so:

  • '@types/download-git-repo'
  • '@types/download-package-tarball'

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

This won't work because npm won't let us publish new packages with the word 'download' in it.

@LinqLover
Copy link

Should there be any policy for DefinitelyTyped to escape such names? E.g., for download-repo, call the types package @types/down--load-repo or something like this?

@peterblazejewicz
Copy link
Author

oh, so that does not matter JS source is already on NPM, @types/{banned-word} cannot be published. Thanks for clarification

@LinqLover one can always submit just the same types directly to the original source code, so types are part of published package.

@LinqLover
Copy link

@LinqLover one can always submit just the same types directly to the original source code, so types are part of published package.

But this comes with all the disadvantages of not going through DefinitelyTyped. Missing or slow maintenance ...

@peterblazejewicz
Copy link
Author

Missing or slow maintenance ...

oh, so, you think, DT is the opposite of those +1
I think publishing to the package is also a win-win scenario for TS ecosystem, and here we're out of the options. I'll close PR

@peterblazejewicz
Copy link
Author

closing after @sandersn comments, thx!

LinqLover added a commit to LinqLover/dtslint that referenced this pull request Dec 22, 2021
See also microsoft#349 and microsoft#350. As soon as an official decision for this issue exists, that should be referenced in the docs as well.
@LinqLover
Copy link

LinqLover commented Dec 22, 2021

I think publishing to the package is also a win-win scenario for TS ecosystem, and here we're out of the options. I'll close PR

IMO this draws the entire idea of TypeScript ad absurdum. Could please someone escalate this issue to

  1. find out/determine what's the official way how to add type defs for package having "download" in their name - some simple escaping rule or, in the worst case, simple rejection?

    Since Microsoft is owning both TypeScript and npm, it should also be possible to request a special allow-rule for @types/download-x packages where the download-x package already exists, shouldn't it?

  2. document the result in the README.md of the DefinitelyTyped repo?

It's pretty irritating for new contributors like me to submit several PRs for packages after following the instructions in the DT repo precisely and then failing at this organizational hurdle.

In addition, considering the trouble in #349 and #350, I have created another PR #351 to document our current knowledge regarding this issue.

@sandersn
Copy link
Member

Re (1): now that npm is part of Microsoft, I'll ask around to see if I can find a contact. They were separate companies when I wrote the workaround.

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.

3 participants