Skip to content

Publish to NPM registry. - #71

Closed
pauldruce wants to merge 6 commits into
bats-core:mainfrom
pauldruce:pdruce/npm-publish
Closed

pauldruce wants to merge 6 commits into
bats-core:mainfrom
pauldruce:pdruce/npm-publish

Conversation

@pauldruce

@pauldruce pauldruce commented Feb 4, 2025 •

Copy link
Copy Markdown

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
Copy Markdown
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

TurekBot commented May 7, 2025

Copy link
Copy Markdown

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
Copy Markdown

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

@jasonkarns jasonkarns mentioned this pull request Aug 12, 2025

@jasonkarns jasonkarns left a comment

Copy link
Copy Markdown
Member

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.

Comment thread .github/workflows/publish.yml Resolved
Comment thread .github/workflows/publish.yml Resolved
Comment thread package.json
"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
Copy Markdown
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
Copy Markdown
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.

Comment thread package.json Resolved
Comment thread package.json Resolved
Comment thread .github/workflows/test.yml Resolved
@jasonkarns

Copy link
Copy Markdown
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.

4 participants