Skip to content

Publish to NPM registry. #71

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

Closed
wants to merge 6 commits into from

Conversation

pauldruce
Copy link

@pauldruce pauldruce commented Feb 4, 2025

Summary of changes:

  • I've added a github workflow which will publish this project as a package on npmjs and the github npm registry.
    • This is essentially the same process that bats-core is using to publish as a node package.
    • This requires a secret called NPM_TOKEN for the existing project to work for the npmjs registry.
    • Publishing to the GitHub npm registry should work without any extra secrets.
  • Listed bats and bats-support as actual dependencies, as bats-assert isn't much use without them.
  • A smoke test of the npm installation was added to show it works.

This PR addressing #70 : bats-core/bats-core#1107

@pauldruce
Copy link
Author

From looking at the current npmjs project. I expect that @jasonkarns should take a look at this, as in order to successfully publish to npmjs, we need an access token for the project.

@TurekBot
Copy link

TurekBot commented May 7, 2025

I ran into #70 as well today; it'd be great if this PR could fix that.

Is @jasonkarns still the person that should look at this?

@TurekBot
Copy link

@jasonkarns, are you the person to take a look at this?

@jasonkarns jasonkarns mentioned this pull request Aug 12, 2025
Copy link
Member

@jasonkarns jasonkarns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #81 to use the release workflow I've settled on for nodenv. Left some comments here so I can understand which additional pieces might still make sense to pull into that PR.

@@ -4,7 +4,7 @@
"description": "Common assertions for Bats",
"homepage": "https://github.com/bats-core/bats-assert",
"license": "CC0-1.0",
"author": "Zoltán Tömböl (https://github.com/ztombol)",
"author": "Bats-core Organization",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ztombol is still the author of this package, even though he's not an active contributor. If we want to list the bats core org, they would be contributors, AFAIUI.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, so we should just add him to the contributors and remove the author field altogether? Author is a very singular sounding field, and this is no longer authored by one person/entity.

@jasonkarns
Copy link
Member

closing with #81 having landed. but i appreciate the work put into this and the ideas shared within. will have followup PRs to reflect the package authorship cleanup and additional tests.

@jasonkarns jasonkarns closed this Aug 15, 2025
@pauldruce pauldruce deleted the pdruce/npm-publish branch August 16, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants