Skip to content
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

fix: added .npmignore file so dist is added in npm release #22

Merged
merged 4 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
__mocks__
babel.config.js
codecov.yml
commitlint.config.js
coverage
jest.config.js
Makefile
renovate.json
src/**/*.test.js
src/**/*.test.jsx
src/**/tests
src/**/setupTest.js
21 changes: 16 additions & 5 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,34 @@
"branch": "master",
"tagFormat": "v${version}",
"verifyConditions": [
"@semantic-release/npm",
{
"path": "@semantic-release/npm",
"pkgRoot": "dist"
},
{
"path": "@semantic-release/github",
Copy link
Member

Choose a reason for hiding this comment

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

This is removing @semantic-release/github, but I believe we would still want this condition. Related to verifyConditions, including @semantic-release/github here ensures the "precense and validity of the authentication [with GitHub]".

Subsequently, when @semantic-release/github is used within publish below, it ensures a GitHub release is created in the repository.

Note, the assets.path configuration currently used with @semantic-release/github can likely stay, pointing to dist. It controls which files are included in a release's archive files (e.g., see "Assets" on the GitHub release for the recently published v4).

"assets": {
"path": "dist/*"
"path": "dist"
}
}
],
"analyzeCommits": "@semantic-release/commit-analyzer",
"generateNotes": "@semantic-release/release-notes-generator",
"prepare": "@semantic-release/npm",
"prepare": [
{
"path": "@semantic-release/npm",
"pkgRoot": "dist"
}
],
"publish": [
"@semantic-release/npm",
{
"path": "@semantic-release/npm",
"pkgRoot": "dist"
},
{
"path": "@semantic-release/github",
"assets": {
"path": "dist/*"
"path": "dist"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@edx/frontend-logging",
"version": "1.0.0-semantically-released",
"description": "edX Frontend logging client code for sending logging and events to Datadog",
"main": "dist/index.js",
"main": "index.js",
"sideEffects": false,
"publishConfig": {
"access": "public"
Expand Down
Loading