mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Acf pnp migration master (#34040)
GitOrigin-RevId: 418eab9bc733f27a6e0f8f04a2a8e21c2f5a491f
This commit is contained in:
committed by
Copybot
parent
d44e862a0c
commit
8f07308342
@@ -5,7 +5,6 @@
|
||||
FROM node:24.14.1 AS base
|
||||
|
||||
# Corepack setup, shared between all the images.
|
||||
ENV PATH="/overleaf/node_modules/.bin:$PATH"
|
||||
ENV COREPACK_HOME=/opt/corepack
|
||||
RUN corepack enable && corepack install -g yarn@4.14.1
|
||||
ENV COREPACK_ENABLE_NETWORK=0
|
||||
@@ -20,7 +19,7 @@ RUN mkdir /home/node/.config && chown node:node /home/node/.config
|
||||
|
||||
FROM base AS app
|
||||
|
||||
COPY package.json yarn.lock .yarnrc.yml /overleaf/
|
||||
COPY package.json yarn.lock .yarnrc.yml .pnp.register.mjs /overleaf/
|
||||
COPY libraries/eslint-plugin/package.json /overleaf/libraries/eslint-plugin/package.json
|
||||
COPY libraries/fetch-utils/package.json /overleaf/libraries/fetch-utils/package.json
|
||||
COPY libraries/logger/package.json /overleaf/libraries/logger/package.json
|
||||
@@ -43,9 +42,11 @@ COPY libraries/settings/ /overleaf/libraries/settings/
|
||||
COPY libraries/stream-utils/ /overleaf/libraries/stream-utils/
|
||||
COPY services/filestore/ /overleaf/services/filestore/
|
||||
|
||||
ENV NODE_OPTIONS="--require /overleaf/.pnp.cjs --import /overleaf/.pnp.register.mjs"
|
||||
|
||||
FROM app
|
||||
RUN mkdir -p uploads template_files \
|
||||
&& chown node:node uploads template_files
|
||||
&& chown node:node uploads template_files
|
||||
USER node
|
||||
|
||||
CMD ["node", "--expose-gc", "app.js"]
|
||||
|
||||
@@ -69,9 +69,11 @@ clean:
|
||||
# Eslint and prettier (plus some configs) are on the root.
|
||||
RUN_LINTING = ../../bin/run -w /overleaf/services/$(PROJECT_NAME) monorepo yarn run --silent
|
||||
RUN_LINTING_MONOREPO = ../../bin/run monorepo yarn run --silent
|
||||
RUN_EXEC_MONOREPO = ../../bin/run monorepo yarn exec
|
||||
|
||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/eslint.config.mjs:/overleaf/eslint.config.mjs --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc.cjs:/overleaf/.prettierrc.cjs --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/filestore/reports:/overleaf/services/filestore/reports --volume $(MONOREPO)/.cache:/overleaf/.cache $(IMAGE_CI) yarn run --silent
|
||||
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/eslint.config.mjs:/overleaf/eslint.config.mjs --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc.cjs:/overleaf/.prettierrc.cjs --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/filestore/reports:/overleaf/services/filestore/reports --volume $(MONOREPO)/.cache:/overleaf/.cache -w /overleaf $(IMAGE_CI) yarn run --silent
|
||||
RUN_EXEC_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/eslint.config.mjs:/overleaf/eslint.config.mjs --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc.cjs:/overleaf/.prettierrc.cjs --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/filestore/reports:/overleaf/services/filestore/reports --volume $(MONOREPO)/.cache:/overleaf/.cache -w /overleaf $(IMAGE_CI) yarn exec
|
||||
|
||||
SHELLCHECK_OPTS = \
|
||||
--shell=bash \
|
||||
@@ -119,14 +121,14 @@ format_fix:
|
||||
$(RUN_LINTING_MONOREPO) format:fix services/filestore
|
||||
|
||||
lint:
|
||||
$(RUN_LINTING) lint
|
||||
$(RUN_EXEC_MONOREPO) eslint --cache --cache-location ./.cache/eslint/ --max-warnings 0 --format unix services/filestore
|
||||
|
||||
lint_ci:
|
||||
-$(RUN_LINTING_CI) lint --format json --output-file reports/eslint.json
|
||||
-$(RUN_EXEC_CI_MONOREPO) eslint --cache --cache-location ./.cache/eslint/ --max-warnings 0 --format json --output-file services/filestore/reports/eslint.json services/filestore
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"$(MONOREPO)_g' reports/eslint.json
|
||||
|
||||
lint_fix:
|
||||
$(RUN_LINTING) lint:fix
|
||||
$(RUN_EXEC_MONOREPO) eslint --cache --cache-location ./.cache/eslint/ --fix services/filestore
|
||||
|
||||
typecheck:
|
||||
$(RUN_LINTING) types:check
|
||||
|
||||
@@ -13,12 +13,14 @@ services:
|
||||
target: base
|
||||
volumes:
|
||||
- .:/overleaf/services/filestore
|
||||
- ../../node_modules:/overleaf/node_modules
|
||||
- ../../libraries:/overleaf/libraries
|
||||
- ../../package.json:/overleaf/package.json
|
||||
- ../../.yarnrc.yml:/overleaf/.yarnrc.yml
|
||||
- ../../yarn.lock:/overleaf/yarn.lock
|
||||
- ../../.yarn:/overleaf/.yarn
|
||||
- ../../.pnp.cjs:/overleaf/.pnp.cjs
|
||||
- ../../.pnp.loader.mjs:/overleaf/.pnp.loader.mjs
|
||||
- ../../.pnp.register.mjs:/overleaf/.pnp.register.mjs
|
||||
- ../../tsconfig.backend.json:/overleaf/tsconfig.backend.json
|
||||
working_dir: /overleaf/services/filestore
|
||||
environment:
|
||||
@@ -26,7 +28,7 @@ services:
|
||||
LOG_LEVEL: ${LOG_LEVEL:-}
|
||||
MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
|
||||
NODE_ENV: test
|
||||
NODE_OPTIONS: "--unhandled-rejections=strict"
|
||||
NODE_OPTIONS: "--require /overleaf/.pnp.cjs --import /overleaf/.pnp.register.mjs --unhandled-rejections=strict"
|
||||
command: yarn run --silent test:unit
|
||||
user: node
|
||||
|
||||
@@ -37,12 +39,14 @@ services:
|
||||
target: base
|
||||
volumes:
|
||||
- .:/overleaf/services/filestore
|
||||
- ../../node_modules:/overleaf/node_modules
|
||||
- ../../libraries:/overleaf/libraries
|
||||
- ../../package.json:/overleaf/package.json
|
||||
- ../../.yarnrc.yml:/overleaf/.yarnrc.yml
|
||||
- ../../yarn.lock:/overleaf/yarn.lock
|
||||
- ../../.yarn:/overleaf/.yarn
|
||||
- ../../.pnp.cjs:/overleaf/.pnp.cjs
|
||||
- ../../.pnp.loader.mjs:/overleaf/.pnp.loader.mjs
|
||||
- ../../.pnp.register.mjs:/overleaf/.pnp.register.mjs
|
||||
- minio-certs:/certs
|
||||
working_dir: /overleaf/services/filestore
|
||||
environment:
|
||||
@@ -62,7 +66,7 @@ services:
|
||||
MOCHA_GREP: ${MOCHA_GREP}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-}
|
||||
NODE_ENV: test
|
||||
NODE_OPTIONS: "--unhandled-rejections=strict"
|
||||
NODE_OPTIONS: "--require /overleaf/.pnp.cjs --import /overleaf/.pnp.register.mjs --unhandled-rejections=strict"
|
||||
ENABLE_CONVERSIONS: true
|
||||
USE_PROM_METRICS: true
|
||||
AWS_S3_USER_FILES_STORAGE_CLASS: REDUCED_REDUNDANCY
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@google-cloud/storage": "^7.19.0",
|
||||
"@types/node": "^24.5.2",
|
||||
"chai": "^4.3.6",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"eslint": "^10.4.0",
|
||||
"mocha": "^11.1.0",
|
||||
"mocha-junit-reporter": "^2.2.1",
|
||||
"mocha-multi-reporters": "^1.5.1",
|
||||
|
||||
Reference in New Issue
Block a user