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

ensure npm pack is tidy #312

Merged
merged 1 commit into from
Aug 18, 2021
Merged

ensure npm pack is tidy #312

merged 1 commit into from
Aug 18, 2021

Conversation

stefanpenner
Copy link
Member

@stefanpenner stefanpenner commented Aug 17, 2021

npm pack of the latest npm (7.20.6) for some reason wouldn’t behave…unless I made these changes.

Am I going crazy?


Anyways... with this, the npm pack output is as follows, which appears alright:

npm notice 1.1kB  LICENSE.md
npm notice 19.4kB README.md
npm notice 3.5kB  addon/@ember/test-waiters/build-waiter.js
npm notice 307B   addon/@ember/test-waiters/index.js
npm notice 460B   addon/@ember/test-waiters/index.ts
npm notice 106B   addon/@ember/test-waiters/token.js
npm notice 10B    addon/@ember/test-waiters/types/index.js
npm notice 1.1kB  addon/@ember/test-waiters/wait-for-promise.js
npm notice 2.5kB  addon/@ember/test-waiters/wait-for.js
npm notice 2.1kB  addon/@ember/test-waiters/waiter-manager.js
npm notice 322B   addon/ember-test-waiters/index.js
npm notice 801B   build-waiter.d.ts
npm notice 1.9kB  force-highlander-addon.js
npm notice 432B   index.d.ts
npm notice 1.9kB  index.js
npm notice 4.0kB  package.json
npm notice 108B   token.d.ts
npm notice 1.0kB  types/custom-ember-debug.d.ts
npm notice 0B     types/dummy/index.d.ts
npm notice 202B   types/global.d.ts
npm notice 2.8kB  types/index.d.ts
npm notice 287B   types/qunit/index.d.ts
npm notice 739B   wait-for-promise.d.ts
npm notice 2.3kB  wait-for.d.ts
npm notice 1.2kB  waiter-manager.d.ts

do we need to publish types/* ? That seems somewhat odd..

@stefanpenner stefanpenner changed the title npm pack of the latest npm (7.20.6) for some reason wouldn’t behave… npm pack strangeness... Aug 17, 2021
@stefanpenner stefanpenner requested a review from scalvert August 17, 2021 22:38
@scalvert
Copy link
Collaborator

We should be publishing the d.ts files that we published before, whatever the format/dir structure. The difference now is that we're just swapping .ts for .js, so all else should ideally be the same.

What was the weirdness you were referring to?

@stefanpenner
Copy link
Member Author

@scalvert the fact that the npmignore required i change /dist/ to /dist/**/* to work...

@stefanpenner
Copy link
Member Author

stefanpenner commented Aug 18, 2021

Speaking with @hjdivad, he pointed out that NPM is confused by **/*.d.ts, it is worth pointing out gitignore files handle this correctly. Suggesting that this is indeed and NPM bug, as NPM points to the gitignore documentation when reading about npmignore.

The issue likely resides in https://github.com/npm/ignore-walk/blob/master/index.js#L198 but I'm a little low on time or I would dig in further.

The solution is to only use *.d.ts which does not trigger this problem.

@stefanpenner stefanpenner changed the title npm pack strangeness... ensure npm pack is tidy Aug 18, 2021
@stefanpenner stefanpenner merged commit f56cc2c into master Aug 18, 2021
@stefanpenner stefanpenner deleted the npmignore branch August 18, 2021 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants