-
Couldn't load subscription status.
- Fork 450
Publish to npm #100
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 to npm #100
Conversation
|
I should note a couple more things in the package:
|
package.json
Outdated
| { | ||
| "name": "bats", | ||
| "version": "v1.0.1", | ||
| "version": "0.4.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.
Any reason why this is set back from v1.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'm going to publish both 1.0.0 and 1.0.1 versions once the rest of the metadata is approved, so (for this PR which won't be merged) I'm keeping it at the old version. That way if I forget to bump it before attempting to publish, it'll error (existing 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.
(FYI, I intend to publish from the commits actually tagged per version)
| "repository": "github:bats-core/bats-core", | ||
| "bin": "./bin/bats" | ||
| "license": "MIT", | ||
| "author": "Sam Stephenson <[email protected]> (http://sstephenson.us/)", |
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.
Though Sam's the original author, of course, I wonder if it wouldn't be more accurate to list https://github.com/bats-core as the author and Sam as a contributor.
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.
Eh, the definitions I typically adhere to:
Author: The person/s or organization that created the project
Owner: The person/s who has administrative ownership over the organization or repository
Maintainers: Contributors who are responsible for driving the vision and managing the organizational aspects of the project.
Contributors: Everyone who has contributed something back to the project.
https://opensource.guide/how-to-contribute/#anatomy-of-an-open-source-project
Obviously, there are many (conflicting) definitions and there's nothing that states github's version as authoritative. However, by switching to AUTHORS file for contributors, that kinda muddies the distinction (which could be seen as a good thing?)
I'd prefer to keep Sam as author in package.json, and move contributors to AUTHORS file. google seems to distinguish AUTHORS file from CONTRIBUTORS file: https://opensource.google.com/docs/releasing/authors/
I wouldn't mind re-addressing this if/when bats-core gets the official nod as maintained successor to bats.
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.
As far as an official nod goes, it'd be lovely if that would happen, and I'd welcome and celebrate it, as that's the order of things I'd prefer (short of being able to contribute to the original project, obviating the need for a fork)—but I've stopped holding my breath.
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.
Same. But until that happens and/or we significantly change the code, I'd prefer to just maintain status quo with him as author?
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 arguable we have, but it's not a blocker, just something about which I was curious to hear others' thoughts.
package.json
Outdated
| ], | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/bats-core/bats-core.git" |
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.
Is this for bpkg compatibility? The github:bats-core/bats-core ID meets the current package.json format: https://docs.npmjs.com/files/package.json#repository
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.
This is the format that was generated by npm init. I'm cool switching to the terse form. (I just confirmed that yarn supports the same short form, so 👍 )
package.json
Outdated
| "bin": "./bin/bats" | ||
| "license": "MIT", | ||
| "author": "Sam Stephenson <[email protected]> (http://sstephenson.us/)", | ||
| "contributors": [ |
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.
Would an AUTHORS file be more desirable? Just got the idea from https://docs.npmjs.com/files/package.json#default-values.
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.
Yeah, I'm cool with that. Generally I try to minimize files in repo root. But since AUTHORS would (presumably) support non-node/npm tools, I'm 👍
| "bin", "libexec", "man" | ||
| ], | ||
| "directories": { | ||
| "bin": "bin", |
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.
So directories.bin obviates the need for the bin parameter? https://docs.npmjs.com/files/package.json#directories
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.
Yep
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.
Not sure what other tweaks may be necessary, but I'm OK with the changes as they are.
This will eliminate the need to bump the version in the readme itself.
|
Throw me your npm registry usernames and I'll add you as maintainers. |
|
@jasonkarns My npm username is @mbland as well. |
|
1.0.0 and 1.0.1 have been published to npm. Merging this for now so it's ready for future releases. |
|
@jasonkarns Just pushed 1.0.2. Mind pushing it to npm, or giving me collaborator permission, whatever is easiest in the short term? |
|
@mbland you should already have maintainer access. (sent invite last week or so?). ping me if that's not the case. related, I would like to see how interested people might be in using |
|
Oh! That's weird. I didn't get an invite email, and I still only see your badge on https://www.npmjs.com/package/bats. But I could click through on https://www.npmjs.com/package/bats/access, see myself listed, and then I'm leaning against using On a related note, I'm wondering if it might be worth moving the "Version history" from the README into its own CHANGES document or some such. |
I believe it does annotated tags by default, but it just uses the version number by default. I'll play around and see if we can customize that.
Strong agree. For other things, I also use |
Updates to package.json for publishing to npm.
The referenced issue from bpkg indicates that they intend to move off of package.json, or otherwise find a way to make bpkg's use compatible with npm. Per that issue, I don't know if that has happened or not. But as this PR stands at present, I believe it will break compatibility with bpkg due to the conflicting semantics of
scripts.For now, my intention is to first get the metadata correct (authorship info, keywords, etc) and publish the currently tagged versions to the npm registry. This can occur without having the package.json merged to master, so we don't necessarily have to resolve the bpkg compatibility issue immediately.