mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
Test npm publish (#3554)
## About the changes https://github.blog/changelog/2022-10-24-npm-v9-0-0-released/ introduced a breaking change in the way they handle files inside package.json which caused some issues with the way we pack and distribute Unleash: > npm pack now follows a strict order of operations when applying ignore rules. If a files array is present in the package.json, then rules in .gitignore and .npmignore files from the root will be ignored. What we discovered is that when having a nested .gitignore (the one we have inside frontend), `npm publish` was taking that nested .gitignore into account (despite the fact that we also have a package.json with files inside the same folder). We tricked this by removing the `build` folder from `frontend/.gitignore` and instead adding it into the root `.gitignore` which is being ignored by `npm publish` following what's stated in the release note above. ----------------- Co-authored-by: Gard Rimestad <gard@getunleash.io>
This commit is contained in:
parent
2e4126c6f7
commit
201c86838f
3
.github/workflows/release.yaml
vendored
3
.github/workflows/release.yaml
vendored
@ -24,9 +24,6 @@ jobs:
|
||||
run: |
|
||||
yarn install --frozen-lockfile
|
||||
yarn --cwd ./frontend install --frozen-lockfile
|
||||
ls -l ./frontend
|
||||
ls -l ./frontend/build
|
||||
npm publish --dry-run
|
||||
- name: Publish to npm
|
||||
run: |
|
||||
LATEST=$(npm show unleash-server version)
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -50,7 +50,8 @@ package-lock.json
|
||||
/website/i18n/*
|
||||
.env
|
||||
|
||||
#report.json
|
||||
# Ignore frontend build
|
||||
frontend/build
|
||||
|
||||
# Generated docs
|
||||
website/docs/reference/api/**/sidebar.js
|
||||
|
1
frontend/.gitignore
vendored
1
frontend/.gitignore
vendored
@ -41,7 +41,6 @@ typings/
|
||||
|
||||
# Built
|
||||
dist
|
||||
build
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
|
@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"files": [
|
||||
"index.js",
|
||||
"build/"
|
||||
"build"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
@ -12,6 +12,7 @@
|
||||
"dist",
|
||||
"docs",
|
||||
"frontend/build",
|
||||
"frontend/build/*",
|
||||
"frontend/index.js",
|
||||
"frontend/package.json"
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user