Dom-testing-library: Create @testing-library scope for publishing.

Created on 20 May 2019  ยท  48Comments  ยท  Source: testing-library/dom-testing-library

As brought up by @brentvatne: https://twitter.com/notbrent/status/1130517657546043394 and suggested by @vincentriemer

Basically:

- yarn add react-testing-library
+ yarn add @testing-library/react

I think that I would still refer to it in writing/speaking as "react testing library."

I think it's a good idea and I grabbed https://npm.im/~testing-library so we should be good to start doing this.

I just want to hear what folks have to say.

Here's how I think we should do it:

  1. Each package maintainer gets to choose whether they want to be publishing their package under the scope and what version to publish at first.
  2. I think I'd like to publish the ones I'm primarily responsible for as 1.0.0 on that scope.
  3. Publish a new _major version_ of each package that has moved which is immediately deprecated with a message indicating people should migrate to the new scoped package.

What thoughts do you all have?

Most helpful comment

Ok, I talked to GitHub support about what happened to the "Used by" feature that we used to have on our repos, and it amounts to basically the fact that they don't support scoped packages with that feature yet (which is mind blowing to me). I guess there's some sort of bug. It's on their backlog though...

All 48 comments

Sounds good to me!

I love it ๐Ÿ‘

Sounds good to me

I think I'd like to publish the ones I'm primarily responsible for as 1.0.0 on that scope.

I'm curious, for my own decision process, what makes you want to do it this way?

Sounds great! Would like to have your comments on how it went with your packages, and how to proceed with re-publishing ours. I'm not too familiar with making this change.

I'm planning on doing this today and I will probably livestream it.

Do we want to rename the repos?

For example: https://github.com/testing-library/dom-testing-library -> https://github.com/testing-library/dom

๐Ÿ‘ I'm good either way

Let's leave it as-is for now and change it later if we decide it makes more sense later :)

After further investigation I've decided it'd be better to continue with the current versioning scheme because the GitHub releases page (and git tags).

Ok, dom-testing-library and react-testing-library are done. Going to do cypress-testing-library and then I'll be done with this.

Who else is planning on moving their packages?

cc @testing-library/angular @testing-library/vue @testing-library/user-event @testing-library/core-maintainers @testing-library/jest-dom @testing-library/puppeteer @testing-library/react-native @testing-library/testcafe

๐Ÿ™‹โ€โ™‚ gonna do it real soon with NTL and jest-native

Ah, actually will we all need permission to publish to the npm organization?

Yes, you do. Please give me your npm usernames.

Mine is bcarroll22

You're on there already :)

Make sure you use --access public when running npm publish

I'm pretty much done with all my stuff. If folks could just give me their npm username then I will get you on the npm org and you should be able to publish. If you'd like a hand, please watch the livestream to see what I did :)

Oh, and now we have a bunch of stuff in the docs to update ๐Ÿ˜ฌ

I will move the angular-testing-library soon, my npm username is timdeschryver

I just sent invites to a bunch of the maintainers of various testing-library packages. If I missed anyone let me know!

@kentcdodds i'm getting a 403 when I try to publish @testing-library/testcafe using --access public

tried logging out/in of npm and confirmed my email is verified...
am i missing something?
```
~/Code/testcafe-testing-library(feature/package-rename*) ยป npm publish --access public b0m01v7@m-c02xr0fajgh7
npm notice
npm notice ๐Ÿ“ฆ @testing-library/[email protected]
npm notice === Tarball Contents ===
npm notice 1.2kB package.json
npm notice 6.9kB README.md
npm notice 3.2kB dist/index.js
npm notice === Tarball Details ===
npm notice name: @testing-library/testcafe
npm notice version: 2.0.0
npm notice package size: 3.8 kB
npm notice unpacked size: 11.3 kB
npm notice shasum: eefeebcf0a69f6993c43ab81aa59ee23aec5ee19
npm notice integrity: sha512-2PWiuKx8z4vWN[...]FZcz7zjNPNv9A==
npm notice total files: 3
npm notice
npm ERR! code E403
npm ERR! 403 Forbidden - PUT https://registry.npmjs.org/@testing-library%2ftestcafe - Forbidden

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/b0m01v7/.npm/_logs/2019-05-31T05_31_15_820Z-debug.log```

I was just thinking this! Yeah I will need access to publish to the org as
well. My npm username is benmonro

On Thu, May 30, 2019 at 11:10 AM Brandon Carroll notifications@github.com
wrote:

Ah, actually will we all need permission to publish to the npm
organization?

โ€”
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
https://github.com/testing-library/dom-testing-library/issues/260?email_source=notifications&email_token=AADBPBGJLASTMYF4ARMXKS3PYAKB3A5CNFSM4HOD27B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWTCKNY#issuecomment-497427767,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADBPBEVV5C7772UM7JOYW3PYAKB3ANCNFSM4HOD27BQ
.

>

Ben Monro
Software Developer

Will the packages be published to both @testing-library/dom and dom-testing-library?|
If not, should there be a deprecation warning or something similar to current users?

@benmonro, I'm pretty sure I added you to the org. I'm thinking you need to accept the invitation though. Look for an email?

Yeah I accepted the invite and I'm in the org... Still get 403

On Fri, May 31, 2019 at 7:48 AM Kent C. Dodds notifications@github.com
wrote:

@benmonro https://github.com/benmonro, I'm pretty sure I added you to
the org. I'm thinking you need to accept the invitation though. Look for an
email?

โ€”
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/testing-library/dom-testing-library/issues/260?email_source=notifications&email_token=AADBPBBEMTOLLZG2FTEWWMDPYE3DRA5CNFSM4HOD27B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWVNURY#issuecomment-497736263,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADBPBESMCO2G6L2ZPP7O63PYE3DRANCNFSM4HOD27BQ
.

>

Ben Monro
Software Developer

Yep did that. Still get a 403.

Weird. Try now.

still no dice:

```

~/Code/testcafe-testing-library(feature/package-rename*) ยป npm logout b0m01v7@m-c02xr0fajgh7

~/Code/testcafe-testing-library(feature/package-rename*) ยป npm login b0m01v7@m-c02xr0fajgh7
Username: benmonro
Password:
Email: (this IS public) ben.[email protected]
Enter one-time password from your authenticator app: 299451

Logged in as benmonro on https://registry.npmjs.org/.

~/Code/testcafe-testing-library(feature/package-rename*) ยป npm publish --access public b0m01v7@m-c02xr0fajgh7
npm notice
npm notice ๐Ÿ“ฆ @testing-library/[email protected]
npm notice === Tarball Contents ===
npm notice 1.2kB package.json
npm notice 6.9kB README.md
npm notice 3.2kB dist/index.js
npm notice === Tarball Details ===
npm notice name: @testing-library/testcafe
npm notice version: 2.0.0
npm notice package size: 3.8 kB
npm notice unpacked size: 11.3 kB
npm notice shasum: 09f1070d96f3c5dfccff633254b142db5288cd10
npm notice integrity: sha512-rwk7lC2X5Fklq[...]UL8Siwer5QaWg==
npm notice total files: 3
npm notice
npm ERR! code E403
npm ERR! 403 Forbidden - PUT https://registry.npmjs.org/@testing-library%2ftestcafe - Forbidden

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/b0m01v7/.npm/_logs/2019-05-31T17_03_05_757Z-debug.log```

Filed an issue w/ npm support... hopefully they get back soon

Getting same error when trying to migrate the vue packages.

whew i'm not crazy!

That's weird! You're both definitely in the org. Maybe you could reach out to NPM support

Does it list the org on your profile settings page?

image

It does for me, I've had a response from npm saying I wasn't in the organization's developers team however even when they moved me in I still got a 403 so ticket still open

Ah, interesting. I didn't realize I had to add people to that team. I've done that now (interestingly Daniel, you _weren't_ on that team). Everyone try again and we'll see if that fixes it!

Successfully published! Thanks, Kent.

Most excellent! Thank you Daniel ๐Ÿ’ฏ

yep worked for me too!

Sweet!

@testing-library/angular has been migrated ๐ŸŽ‰. I didn't have any issues.

Interesting that the "usage" stats ticker seems to be gone now

Screen Shot 2019-05-31 at 2 30 13 PM

Awesome @timdeschryver!

@alecook, I'm guessing it'll come back as people start upgrading. It's really unfortunate to lose all the download stats, but the earlier we do this the better I say.

ok svelte-testing-library is now moved as well. docs are updated (PRs open) for testcafe and svelte.

user-event migrated ๐ŸŽ‰

Most packages are done!!

Ok, I talked to GitHub support about what happened to the "Used by" feature that we used to have on our repos, and it amounts to basically the fact that they don't support scoped packages with that feature yet (which is mind blowing to me). I guess there's some sort of bug. It's on their backlog though...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PaulInglis picture PaulInglis  ยท  3Comments

ruscal picture ruscal  ยท  3Comments

nicolasschabram picture nicolasschabram  ยท  3Comments

NiGhTTraX picture NiGhTTraX  ยท  3Comments

LaurensBosscher picture LaurensBosscher  ยท  4Comments