-
Notifications
You must be signed in to change notification settings - Fork 11
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
Publish release packages to npm registry #43
Conversation
206d7cb
to
7ca82bd
Compare
lib/package.json
Outdated
@@ -1,10 +1,11 @@ | |||
{ | |||
"name": "moq-player", | |||
"name": "@~englishm/moq-player", | |||
"version": "0.0.1", |
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.
I think 0.1.4
was the last @kixelated/moq
release before the fork. I'm thinking maybe we start this at 0.2.0
?
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.
Sure! Done ✅
lib/package.json
Outdated
@@ -1,10 +1,11 @@ | |||
{ | |||
"name": "moq-player", | |||
"name": "@~englishm/moq-player", |
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.
After looking into how orgs work on npmjs, I created @moq-js
. I was thinking maybe we could then name this package @moq-js/player
. How does that sound? Or would @moq-js/moq-player
be better?
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.
Sounds good, we even discuss this with @JoaquinBCh and @mcintyrehh that we could keep the package name just @moq-js/player
by now and try to decouple the inner potential packages like @moq-js/publisher
and @moq-js/transport
later
lib/package.json
Outdated
"version": "0.0.1", | ||
"description": "Media over QUIC library", | ||
"license": "(MIT OR Apache-2.0)", | ||
"wc-player": "video-moq/index.ts", | ||
"simple-player": "playback/index.ts", | ||
"files": ["dist" , "common" , "media" , "playback", "transport", "types" , "video-moq"], |
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.
For some reason this wasn't sufficient to publish the contents of the dist/
directory - maybe because of how npm only partially overrides .gitignore
?
I found that dist/**/*
did work though. See the package.json
and contents of dist/
here: https://www.npmjs.com/package/@moq-js-ci-test/moq-js?activeTab=code and also https://cdn.jsdelivr.net/npm/@moq-js-ci-test/moq-js@latest/dist/moq-player.iife.js
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.
We realize and tested that only the dist folder is needed. I checked locally with npm pack
that the dist folder is boundled with "files": ["dist" ]
and remove the other folders. You can check https://www.npmjs.com/package/@juanmanulpzg/player/v/0.2.3?activeTab=code .
Hope this fix works for you as well, if not we could try dist/**/*
package.json
Outdated
@@ -1,7 +1,7 @@ | |||
{ | |||
"name": "moq-js", | |||
"name": "@~englishm/moq-js", | |||
"version": "1.0.0", |
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's not entirely clear to me what we should have in this top-level package.json for a name and version if we're really only publishing lib/
right now. Should this be kept in sync with lib/package.json
or should it be some other placeholder name and version?
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.
True. After the changes I fixed on tuesday, I should remove this changes as well. It's done now
This is really great, thank you! Left a few comments about naming/versioning and also one thing we need to fix so the |
9cac2fd
to
947a44a
Compare
Thanks for the review! The PR is now updated |
947a44a
to
3fdd3b1
Compare
3fdd3b1
to
5e8ab63
Compare
5e8ab63
to
200beab
Compare
As discussed in #31 and #36 , this PR adds a GitHub Actions workflow that publishes a new release package to the https://www.npmjs.com/org/moq-js npm repository. This enables distribution via:
Note
I tested this behaviour by publishing to https://www.npmjs.com/package/@juanmanulpzg/player. Please check this temp commit in my fork repo to see the only differences compared to the current PR changes.
Considerations:
Feel free to suggest any improvements to these changes ✨