Selaa lähdekoodia

refactor: unify pnpm version management with packageManager field (#23943)

tags/1.8.0
lyzno1 2 kuukautta sitten
vanhempi
commit
62c34c4bc2
No account linked to committer's email address

+ 3
- 1
.github/workflows/style.yml Näytä tiedosto

@@ -82,7 +82,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
package_json_file: web/package.json
run_install: false

- name: Setup NodeJS
@@ -95,10 +95,12 @@ jobs:

- name: Web dependencies
if: steps.changed-files.outputs.any_changed == 'true'
working-directory: ./web
run: pnpm install --frozen-lockfile

- name: Web style check
if: steps.changed-files.outputs.any_changed == 'true'
working-directory: ./web
run: pnpm run lint

docker-compose-template:

+ 3
- 1
.github/workflows/translate-i18n-base-on-english.yml Näytä tiedosto

@@ -46,7 +46,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
package_json_file: web/package.json
run_install: false

- name: Set up Node.js
@@ -59,10 +59,12 @@ jobs:

- name: Install dependencies
if: env.FILES_CHANGED == 'true'
working-directory: ./web
run: pnpm install --frozen-lockfile

- name: Generate i18n translations
if: env.FILES_CHANGED == 'true'
working-directory: ./web
run: pnpm run auto-gen-i18n ${{ env.FILE_ARGS }}

- name: Create Pull Request

+ 3
- 1
.github/workflows/web-tests.yml Näytä tiedosto

@@ -35,7 +35,7 @@ jobs:
if: steps.changed-files.outputs.any_changed == 'true'
uses: pnpm/action-setup@v4
with:
version: 10
package_json_file: web/package.json
run_install: false

- name: Setup Node.js
@@ -48,8 +48,10 @@ jobs:

- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
working-directory: ./web
run: pnpm install --frozen-lockfile

- name: Run tests
if: steps.changed-files.outputs.any_changed == 'true'
working-directory: ./web
run: pnpm test

+ 4
- 1
web/Dockerfile Näytä tiedosto

@@ -6,7 +6,7 @@ LABEL maintainer="takatost@gmail.com"
# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

RUN apk add --no-cache tzdata
RUN npm install -g pnpm@10.13.1
RUN corepack enable
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

@@ -19,6 +19,9 @@ WORKDIR /app/web
COPY package.json .
COPY pnpm-lock.yaml .

# Use packageManager from package.json
RUN corepack install

# if you located in China, you can use taobao registry to speed up
# RUN pnpm install --frozen-lockfile --registry https://registry.npmmirror.com/


+ 1
- 0
web/package.json Näytä tiedosto

@@ -2,6 +2,7 @@
"name": "dify-web",
"version": "1.7.2",
"private": true,
"packageManager": "pnpm@10.14.0",
"engines": {
"node": ">=v22.11.0"
},

Loading…
Peruuta
Tallenna