Blazing Fast Tips: Publishing to NPM

Blazing Fast Tips: Publishing to NPM

Matt Pocock

1 год назад

75,301 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@abhaykumar9806
@abhaykumar9806 - 11.08.2024 12:18

I followed your video till the end. Definitely gained confidence on few things. This video does not publish the packages though. Just creates a PR. I would definitely love to see the complete picture. If you have a course to setup pnpm, turborepo, tsup and related course, please share the link

Ответить
@DnKZone
@DnKZone - 29.07.2024 01:36

That's just way too much information in 4 minutes to grasp, create a 30 minutes+ video on this

Ответить
@Skaar18
@Skaar18 - 27.06.2024 09:34

I would love to see an updated video for releasing a npm package. Specificaly, where you also walkthrough how to configure the github actions and getting it completely released. You said nothing about it in this video. There are also a few mistakes in this video, e.g. you never added the release script. Love your videos in general, but would love a better video about this topic

Ответить
@hamdaniash-siddiq5021
@hamdaniash-siddiq5021 - 26.06.2024 17:37

When Matt uploads a new video, we know it’s going to be a new useful knowledge. You’re awesome..❤

Ответить
@user-wf4qq8kw5q
@user-wf4qq8kw5q - 06.05.2024 09:28

Thank you so much Matt Pocock

Ответить
@PlayerRPG85
@PlayerRPG85 - 19.04.2024 22:19

This was great! Fast is good, people

Ответить
@hiteshrohilla
@hiteshrohilla - 13.04.2024 13:30

it was way too fast for me

Ответить
@lp1926.guitars
@lp1926.guitars - 06.04.2024 00:27

the amount of info you can pack in one video plus the clarity of the sentences is remarkable

Ответить
@MuhammadBilal-ky2yx
@MuhammadBilal-ky2yx - 30.03.2024 17:43

how to publish components of(Vite React + typescript) to npm . i did it but when i use it by installing that libaray it arise with some issue🥲

Ответить
@ashuzon
@ashuzon - 09.02.2024 10:34

Too much info. I'll come back later. But I'll return.

Ответить
@guzidev
@guzidev - 06.02.2024 05:02

Nice video, how you can group files index.js and index.d.ts in file explorer?

Ответить
@danwhite2717
@danwhite2717 - 13.01.2024 12:48

Probably one of the best informative videos I’ve seen in a long time

Ответить
@arthurvanleeuwen9650
@arthurvanleeuwen9650 - 01.01.2024 17:10

Awesome! Could you make a tutorial of you how to this while using bun?

Ответить
@lion-gg
@lion-gg - 26.12.2023 13:12

On using "type": "module", config change to "main": "dist/index.cjs", "module": "dist/index.js". Right ?

Ответить
@JoystickStereo
@JoystickStereo - 23.12.2023 12:36

I've been running around in circles all day trying to figure out how to bundle my TS package properly in a way that let's it work properly with 'npm link'. Finally, finally, I've found a video that gives a working process (and in a very concise, easily digestible manner at that)—thank you.

Ответить
@nader2560
@nader2560 - 18.12.2023 12:14

That is great but if you want to deploy a package that has multiple files and you want it to export files individually (like date-fns or lodash to name a few) then you will find zero docs/common best practices to do it online

Ответить
@ironsand
@ironsand - 26.11.2023 19:03

It when from 0-100 so fast! 😂

Ответить
@AdamM
@AdamM - 10.11.2023 00:45

Love this... Would this work with a mono-repo style where you have several packages all with differing versions?

Ответить
@denniseriksson1071
@denniseriksson1071 - 04.11.2023 17:50

Awesome video/videos, thanks! Heads up for a newbie question.. When you publish the package to NPM would you publish it with the same package.json as you have when coding the package? I guess that the final package sent to NPM does not need/need to know the dependency to tsup now when the source code is bundled? Even if they are set as 'devDependencies' do we really need to include them in the final package.json at all?

Ответить
@pablom8854
@pablom8854 - 31.10.2023 22:55

couldn' get the changeset part please make a video about it

Ответить
@CaleMcCollough
@CaleMcCollough - 10.10.2023 21:27

I'm in Windows and I can't run npm changeset. Does anyone else have this problem or know a solution? Thanks. *Update* You have to run npx changeset, but now I'm getting Error: Failed to find where HEAD diverged from main. Does main exist?

Ответить
@totetoBT
@totetoBT - 08.10.2023 16:07

Great summary, just what I was looking for. Nice pace also!

Ответить
@baldcoder_
@baldcoder_ - 03.10.2023 23:40

I'm sure it's just me being a novice, but Rollup gave me nightmares! No matter what I tried, nothing worked, and don't get me started on the questions I had to go through to resolve path alias errors.

tsup just works! 😍This video is such a life saver, THANK YOU!!!

Ответить
@andrevenancio
@andrevenancio - 29.09.2023 17:50

This looks awesome, but my main question around changeset is how to add it in the context of a monorepo (lets say with turborepo). Video idea right there!

Ответить
@XXlikeabauss
@XXlikeabauss - 29.09.2023 03:50

The fact that this video is < 4 minutes is incredibly appreciated

Ответить
@ricardor8044
@ricardor8044 - 13.09.2023 17:37

This publish thing didn't work for me, too many errors

Ответить
@scriptcomedian
@scriptcomedian - 12.09.2023 18:27

Now its time to do it with the Bun bundler :D

Ответить
@robschilder3092
@robschilder3092 - 12.09.2023 16:52

Anyone know how this differs when using bun?

Ответить
@statecznylukas
@statecznylukas - 08.09.2023 10:07

Does not fully work for me. Build fails with pnpm install --frozen-lock-file. I had to add auto-install-peers=false in .npmrc file, then it works.
Publish however requires GITHUB_TOKEN so I added env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} line in publish.yaml, but github does not allow secret name to start with GITHUB so I'm kinda stuck on publish step.

Ответить
@JaeTask
@JaeTask - 22.08.2023 18:47

Matt, do you still use this method? or do you use another packager now? using vite etc

Ответить
@healingwithlove8614
@healingwithlove8614 - 13.08.2023 16:20

This is what I looking for

Ответить
@dgcp354
@dgcp354 - 12.08.2023 19:22

how can i export css file from the package?

Ответить
@danielnoworyta
@danielnoworyta - 02.08.2023 08:55

Getting publish
Error: The process '/usr/bin/git' failed with exit code 128

Anyone know the answer? :)

Ответить
@prasathsoosaithasan1281
@prasathsoosaithasan1281 - 30.07.2023 10:41

Awesome, thank you. Good introduction to tsup will help me to get rid of my overkill rollup setup.

Ответить
@spiffjekey-green4034
@spiffjekey-green4034 - 20.07.2023 18:43

You made me watch a 3 minutes video in 40 minutes, the content is just too good. Big thanks :)

Ответить
@leumasme
@leumasme - 11.07.2023 02:19

I'd recommend the `wireit` script runner developed by google for all but the most simple `npm run` scripts.

Ответить
@user-rb4kf4ip4r
@user-rb4kf4ip4r - 24.06.2023 16:58

Seriously I had lost hope to support CommonJS and ES6 imports and publish a package ... but at last found your video ... Tks man!!

Ответить
@goodboyneon
@goodboyneon - 16.06.2023 16:22

I just across your channel. Can't belive I've been missing all of these golden content for all these days!

Ответить
@HosamSultan
@HosamSultan - 10.06.2023 00:30

I really can't thank you enough for this condensed video.
The pace made me struggle the first time I watched the video a while ago, but now that I needed the instructions, I know that this pace is all I needed! <3

I also struggled with github actions and workflows at first (because of an authentication problem, and the fact that this is my first time ever to try actions), but when I fussed around with it I learned a lot.
Also, thanks for not using npm by default. I learned a lot about the use of npx to run stuff like changeset and the likes.

A 3 and a half minute video that gave me a crash course for a lifetime. <3

So, thanks a bunch!

Ответить
@AnonAnon-qw3zh
@AnonAnon-qw3zh - 06.06.2023 00:57

publish workflow doesn't work

Ответить
@vpetryniak
@vpetryniak - 27.04.2023 20:51

does it work for building backend nodejs library? Should we bundle backend nodejs libraries?

Ответить
@Luxcium
@Luxcium - 27.04.2023 06:46

Ho other people are asking about monorepo stuff and they do deserve to learn all that jazz from you 😅 oh — Me? No I am just asking for a friend… I am using multi root VSCode workspaces and I started using the Rush Stack but I feel like it is not something that is convivial enough for my workflow 😮

Ответить
@Luxcium
@Luxcium - 27.04.2023 06:43

I would love to have a long form video about each of those topics all alone for maximum understanding… it could be fast paced I love it when it is fast but it should be going more into the details… 🎉🎉🎉🎉

Ответить
@thomas-sinkala
@thomas-sinkala - 20.04.2023 12:02

Thank Matt. Any idea how I can build to a single .js file that could be hosted on a CDN?

Ответить
@samuelwittlinger7790
@samuelwittlinger7790 - 03.04.2023 12:52

I used the bundler and now I am getting a bunch of errors of these 2 types. Does anyone please know how to fix this?

The inferred type of 'router' cannot be named without a reference to '.pnpm/@[email protected]/node_modules/@types/express'. This is likely not portable. A type annotation is necessary.
Property 'app' of exported class expression may not be private or protected.ts(4094)

Ответить
@rahulsriram6295
@rahulsriram6295 - 30.03.2023 15:46

Amazing video! But how good it changesets for beta releases?

Ответить
@lakardion
@lakardion - 12.03.2023 01:36

This is exactly what I was looking for. Thank you very much Matt!

Ответить
@whoman7930
@whoman7930 - 25.02.2023 10:17

Would it be the same process for creating a react package?

Ответить
@driverjb09
@driverjb09 - 23.02.2023 17:41

This is great! Any chance you could do a GitLab version of the video?

Ответить
@OdwallaJuice
@OdwallaJuice - 21.02.2023 19:57

One part of the flow I'm confused about is when the changeset action creates a PR? So for example, a changeset would be created in a feature PR and then that would get merged into main. After the feature PR is merged into main, is that when the action creates the new PR for bumping the version and adding the changeset to the changelog? Then once that's merged it publishes the package?

Ответить