0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

pnpm 8 upgrade build (#3726)

This commit is contained in:
Juan Picado 2023-04-12 08:23:01 +02:00 committed by GitHub
parent 55a6706834
commit d72a0555fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 7259 additions and 6653 deletions

View file

@ -33,7 +33,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
- name: install pnpm
run: npm i pnpm@6.32.15 -g
run: npm i pnpm@latest-8 -g
env:
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}

View file

@ -24,13 +24,17 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
run: npm i pnpm@latest-8 -g
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --frozen-lockfile --registry http://localhost:4873
run: pnpm install --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
@ -49,13 +53,17 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --offline --frozen-lockfile --reporter=silence --ignore-scripts
run: pnpm install --offline --reporter=silence --ignore-scripts
- name: Lint
run: pnpm lint
format:
@ -69,13 +77,17 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --offline --frozen-lockfile --reporter=silence --ignore-scripts
run: pnpm install --offline --reporter=silence --ignore-scripts
- name: Lint
run: pnpm format:check
build:
@ -94,13 +106,17 @@ jobs:
with:
node-version: ${{ matrix.node_version }}
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --offline --frozen-lockfile --reporter=silence --ignore-scripts --registry http://localhost:4873
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
- name: build
run: pnpm build
- name: Test
@ -115,13 +131,17 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --offline --frozen-lockfile --reporter=silence --registry http://localhost:4873
run: pnpm install --offline --reporter=silence --registry http://localhost:4873
- name: build
run: pnpm build
- name: Test UI

View file

@ -35,13 +35,13 @@ jobs:
- name: Install pnpm
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
corepack prepare --activate pnpm@latest-8
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --frozen-lockfile --registry http://localhost:4873
run: pnpm install --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
@ -62,13 +62,16 @@ jobs:
- name: Install pnpm
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
corepack prepare --activate pnpm@latest-8
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --offline --frozen-lockfile --reporter=silence --ignore-scripts
run: pnpm install --offline --ignore-scripts
- name: Lint
run: pnpm lint
format:
@ -84,13 +87,16 @@ jobs:
- name: Install pnpm
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
corepack prepare --activate pnpm@latest-8
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --offline --frozen-lockfile --reporter=silence --ignore-scripts
run: pnpm install --offline --ignore-scripts
- name: Lint
run: pnpm format:check
test:
@ -111,13 +117,16 @@ jobs:
- name: Install pnpm
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
corepack prepare --activate pnpm@latest-8
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --offline --frozen-lockfile --reporter=silence --ignore-scripts --registry http://localhost:4873
run: pnpm install --offline --ignore-scripts --registry http://localhost:4873
- name: build
run: pnpm build
- name: Test
@ -126,7 +135,7 @@ jobs:
needs: [test]
runs-on: ubuntu-latest
name: synchronize translations
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag=v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
@ -135,14 +144,17 @@ jobs:
- name: Install pnpm
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
corepack prepare --activate pnpm@latest-8
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
## we need scripts, pupetter downloads aditional content
run: pnpm recursive install --frozen-lockfile --registry http://localhost:4873
run: pnpm install --registry http://localhost:4873
- name: build
run: pnpm build
- name: generate website translations

View file

@ -21,13 +21,13 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
run: npm i pnpm@latest-8 -g
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --frozen-lockfile --reporter=silence --ignore-scripts --registry http://localhost:4873
run: pnpm install --reporter=silence --ignore-scripts --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
@ -45,13 +45,16 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --frozen-lockfile --reporter=silence --registry http://localhost:4873
run: pnpm recursive install --reporter=silence --registry http://localhost:4873
- name: build
run: pnpm build
- name: Cache packages
@ -85,13 +88,16 @@ jobs:
with:
node-version: ${{ matrix.node }}
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --offline --frozen-lockfile --reporter=silence --ignore-scripts --registry http://localhost:4873
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ./packages/
@ -101,6 +107,6 @@ jobs:
# path: ./e2e/
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: build e2e
run: pnpm run build --filter=./e2e
run: pnpm --filter @verdaccio/test-cli-commons build
- name: Test CLI
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}

View file

@ -23,9 +23,9 @@ jobs:
- name: Install pnpm
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
corepack prepare --activate pnpm@latest-8
- name: Install
run: pnpm install --frozen-lockfile --reporter=silence --registry http://localhost:4873
run: pnpm install --reporter=silence --registry http://localhost:4873
- name: build
run: pnpm build
- name: Test UI

View file

@ -47,9 +47,9 @@ jobs:
- name: Install pnpm
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
corepack prepare --activate pnpm@latest-8
- name: Install
run: pnpm recursive install --frozen-lockfile
run: pnpm install
- name: Build storybook
run: pnpm ui:storybook:build
- name: Copy public content

View file

@ -42,7 +42,7 @@ jobs:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
with:
version: 6.32.15
version: latest-8
run_install: |
- recursive: true
args: [--frozen-lockfile]

1
.npmrc
View file

@ -1,4 +1,3 @@
always-auth = true
recursive-install = true
loglevel=info
fetch-retries="10"

View file

@ -44,7 +44,7 @@ This setting would cause the `pnpm install` command to install incorrect version
To begin your development setup, please install the latest version of pnpm globally:
```
npm i -g pnpm@latest-6
npm i -g pnpm@latest-8
```
With pnpm installed, the first step is installing all dependencies:

View file

@ -11,7 +11,7 @@ RUN apk --no-cache add openssl ca-certificates wget && \
WORKDIR /opt/verdaccio-build
COPY . .
RUN npm -g i pnpm@6.32.15 && \
RUN npm -g i pnpm@latest-8 && \
pnpm config set registry $VERDACCIO_BUILD_REGISTRY && \
pnpm recursive install --frozen-lockfile --ignore-scripts && \
rm -Rf test && \

View file

@ -17,6 +17,7 @@
"devDependencies": {
"@babel/cli": "7.20.7",
"@babel/core": "7.20.7",
"@babel/eslint-parser": "7.11.0",
"@babel/node": "7.20.7",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.20.7",
@ -50,7 +51,12 @@
"@testing-library/react": "12.1.4",
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
"@types/async": "3.2.16",
"@types/body-parser": "1.19.2",
"@types/connect": "3.4.35",
"@types/cookiejar": "2.1.2",
"@types/debug": "^4.1.7",
"@types/express": "4.17.15",
"@types/express-serve-static-core": "4.17.31",
"@types/http-errors": "1.8.2",
"@types/jest": "27.5.2",
"@types/jsonwebtoken": "8.5.9",
@ -59,6 +65,8 @@
"@types/minimatch": "3.0.5",
"@types/node": "16.18.10",
"@types/node-fetch": "2.6.2",
"@types/qs": "6.9.7",
"@types/range-parser": "1.2.4",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
"@types/react-router-dom": "5.3.3",
@ -66,6 +74,8 @@
"@types/redux": "3.6.0",
"@types/request": "2.48.8",
"@types/semver": "7.3.13",
"@types/serve-static": "1.13.10",
"@types/superagent": "4.1.10",
"@types/supertest": "2.0.12",
"@types/testing-library__jest-dom": "5.14.5",
"@types/validator": "13.7.12",
@ -78,7 +88,6 @@
"@verdaccio/types": "workspace:*",
"@verdaccio/ui-theme": "workspace:*",
"babel-core": "7.0.0-bridge.0",
"@babel/eslint-parser": "7.11.0",
"babel-jest": "29.4.3",
"babel-plugin-dynamic-import-node": "2.3.3",
"babel-plugin-emotion": "10.2.2",
@ -119,22 +128,22 @@
"scripts": {
"prepare": "husky install",
"husky:pre-commit": "lint-staged",
"clean": "pnpm run clean --filter=./packages",
"build": "pnpm run build --filter=./packages && pnpm run build --filter=./e2e",
"clean": "pnpm --filter \"./packages/**\" clean",
"build": "pnpm --filter \"./packages/**\" build && pnpm --filter @verdaccio/test-cli-commons build",
"docker": "docker build -t verdaccio/verdaccio:local . --no-cache",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
"lint": "eslint --max-warnings 100 \"**/*.{js,jsx,ts,tsx}\"",
"test": "pnpm recursive test --filter ./packages",
"test:e2e:cli": "pnpm test --filter ...@verdaccio/e2e-cli-* -- --coverage=false",
"test:e2e:ui": "pnpm test --filter ...@verdaccio/e2e-ui",
"test": "pnpm --filter \"./packages/**\" test",
"test:e2e:cli": "pnpm --filter ...@verdaccio/e2e-cli-* test -- --coverage=false",
"test:e2e:ui": "pnpm --filter ...@verdaccio/e2e-ui test",
"start": "concurrently --kill-others \"pnpm _start:server\" \"pnpm _start:web\"",
"contributors": "ts-node ./scripts/contributors-update.ts",
"script:addson": "ts-node ./scripts/addon-update.ts",
"start:watch": "concurrently --kill-others \"pnpm _build:watch\" \"pnpm _start:server\" \"pnpm _debug:reload\"",
"_build:watch": "pnpm run --parallel watch --filter ./packages",
"_start:server": "node --inspect packages/verdaccio/debug/bootstrap.js --listen 8000",
"_start:web": "pnpm start --filter ...@verdaccio/ui-theme",
"_start:web": "pnpm --filter ...@verdaccio/ui-theme start",
"_debug:reload": "nodemon -d 3 packages/verdaccio/debug/bootstrap.js",
"start:ts": "ts-node packages/verdaccio/src/start.ts -- --listen 8000",
"debug": "node --trace-warnings --trace-uncaught --inspect packages/verdaccio/debug/bootstrap.js",
@ -147,15 +156,15 @@
"ci:version:changeset": "changeset version",
"ci:publish": "changeset publish",
"ts:ref": "update-ts-references --discardComments",
"website": "pnpm build --filter ...@verdaccio/website",
"ui:storybook:build": "pnpm build-storybook --filter ...@verdaccio/ui-components",
"ui:storybook": "pnpm storybook --filter ...@verdaccio/ui-components",
"website": "pnpm --filter ...@verdaccio/website build",
"ui:storybook:build": "pnpm --filter ...@verdaccio/ui-components build-storybook",
"ui:storybook": "pnpm --filter ...@verdaccio/ui-components storybook",
"translations": "local-crowdin-api translations",
"crowdin:upload": "crowdin upload sources --auto-update --config ./crowdin.yaml",
"crowdin:download": "crowdin download --verbose --config ./crowdin.yaml",
"crowdin:sync": "pnpm crowdin:upload && pnpm crowdin:download --verbose",
"postinstall": "husky install",
"local:registry": "pnpm start --filter ...@verdaccio/local-publish",
"local:registry": "pnpm --filter ...@verdaccio/local-publish start",
"local:snapshots": "changeset version --snapshot",
"local:publish": "cross-env npm_config_registry=http://localhost:4873 pnpm ci:publish -- --no-git-tag",
"local:publish:release": "concurrently \"pnpm local:registry\" \"pnpm local:publish\""
@ -167,8 +176,7 @@
}
},
"engines": {
"node": ">=16.5",
"pnpm": ">=6.32.3 <7.0.0"
"node": ">=16.5"
},
"license": "MIT",
"lint-staged": {

View file

@ -31,10 +31,11 @@
"npm": ">=6"
},
"dependencies": {
"debug": "4.3.4",
"@verdaccio/core": "workspace:6.0.0-6-next.67"
"@verdaccio/core": "workspace:6.0.0-6-next.67",
"debug": "4.3.4"
},
"devDependencies": {
"@types/debug": "^4.1.7",
"@verdaccio/config": "workspace:6.0.0-6-next.67",
"@verdaccio/types": "workspace:11.0.0-6-next.25"
},

View file

@ -5,3 +5,5 @@ declare module 'pretty-format' {
declare module '@jest/schemas' {
export type SnapshotFormat = any;
}
declare module 'ms';

View file

@ -28,10 +28,12 @@
"@rematch/loading": "2.1.2",
"@rematch/persist": "2.1.2",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"country-flag-icons": "1.5.5",
"dayjs": "1.11.7",
"dompurify": "2.4.5",
"github-markdown-css": "5.1.0",
"highlight.js": "11.7.0",
"history": "4.10.1",
"i18next": "20.6.1",
"localstorage-memory": "1.0.3",
"lodash": "4.17.21",
@ -39,18 +41,16 @@
"normalize.css": "8.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.41.1",
"react-i18next": "12.1.1",
"react-json-view": "1.21.3",
"react-markdown": "8.0.5",
"react-redux": "7.2.9",
"react-hook-form": "7.41.1",
"react-router": "5.3.4",
"react-router-dom": "5.3.4",
"react-virtualized": "9.22.3",
"country-flag-icons": "1.5.5",
"history": "4.10.1",
"react-markdown": "8.0.5",
"remark-gfm": "3.0.1",
"redux": "4.2.1",
"remark-gfm": "3.0.1",
"validator": "13.9.0"
},
"devDependencies": {
@ -70,6 +70,9 @@
"@testing-library/dom": "8.19.1",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@types/react-router": "^5.1.20",
"@types/hast": "^2.0.0",
"@types/unist": "^2.0.0",
"babel-loader": "^8.3.0",
"mockdate": "3.0.5",
"msw": "0.49.2"

View file

@ -0,0 +1,2 @@
declare module 'unist';
declare module 'hast';

File diff suppressed because it is too large Load diff

5
types/patch.d.ts vendored
View file

@ -7,6 +7,5 @@ declare module '@jest/schemas' {
export type SnapshotFormat = any;
}
// declare module '@szmarczak/http-timer';
// declare module 'cacheable-lookup';
// // declare module 'p-cancelable';
declare module 'serve-static';
declare module 'ms';