Yarn 4 Migration (#32253)

Migrates the Overleaf monorepo package manager from npm (v11) to Yarn 4 (v4.9.1) using node-modules linker mode.

GitOrigin-RevId: 50d32ab01955c15e29679eff9e9e9cfb897fab2d
This commit is contained in:
Anna Claire Fields
2026-04-28 08:52:37 +00:00
committed by Copybot
parent ed0fb0110a
commit 0d64a88a46
137 changed files with 39227 additions and 538 deletions
+20 -6
View File
@@ -130,13 +130,27 @@ const config: StorybookConfig = {
},
module: {
...storybookConfig.module,
rules: (storybookConfig.module?.rules ?? []).concat({
test: /\.wasm$/,
type: 'asset/resource',
generator: {
filename: 'js/[name]-[contenthash][ext]',
rules: (storybookConfig.module?.rules ?? []).concat(
{
test: /\.wasm$/,
type: 'asset/resource',
generator: {
filename: 'js/[name]-[contenthash][ext]',
},
},
}),
{
// Disable webpack's `new URL()` processing for pdfjs-dist worker
// files, so that webpack does not try to resolve qcms_bg.wasm and
// openjpeg.wasm (which live in pdfjs-dist/wasm/, not build/).
// The main webpack build relies on a `/* webpackIgnore: true */`
// comment (via yarn patch) to achieve the same effect, but
// storybook's babel pipeline may strip comments from the 1.9 MB
// worker file (babel `compact: "auto"` removes comments for files
// > 500 KB), so we disable URL parsing for these files instead.
test: /pdfjs-dist.*pdf\.worker.*\.m?js$/,
parser: { javascript: { url: false } },
}
),
},
}
},
+10 -8
View File
@@ -4,6 +4,8 @@
FROM node:24.14.1 AS base
WORKDIR /overleaf/services/web
ENV PATH="/overleaf/node_modules/.bin:$PATH"
RUN corepack enable
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
@@ -22,10 +24,10 @@ RUN mkdir -p /overleaf/services/web/data/dumpFolder \
COPY services/web/certs/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crt.pem /usr/local/share/ca-certificates/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crt
RUN update-ca-certificates
# the deps image is used for caching npm ci
# the deps image is used for caching yarn workspaces focus
FROM base AS deps-prod
COPY package.json package-lock.json /overleaf/
COPY package.json yarn.lock .yarnrc.yml /overleaf/
COPY libraries/access-token-encryptor/package.json /overleaf/libraries/access-token-encryptor/package.json
COPY libraries/eslint-plugin/package.json /overleaf/libraries/eslint-plugin/package.json
COPY libraries/fetch-utils/package.json /overleaf/libraries/fetch-utils/package.json
@@ -43,16 +45,16 @@ COPY libraries/stream-utils/package.json /overleaf/libraries/stream-utils/packag
COPY libraries/validation-tools/package.json /overleaf/libraries/validation-tools/package.json
COPY services/web/package.json /overleaf/services/web/package.json
COPY tools/migrations/package.json /overleaf/tools/migrations/package.json
COPY patches/ /overleaf/patches/
COPY .yarn/patches/ /overleaf/.yarn/patches/
RUN cd /overleaf && NODE_ENV=production npm ci --quiet
RUN cd /overleaf && NODE_ENV=production yarn workspaces focus --production @overleaf/web
FROM deps-prod AS deps
ENV CYPRESS_INSTALL_BINARY=0
COPY tsconfig.backend.json /overleaf/
RUN cd /overleaf && npm install
RUN cd /overleaf && yarn workspaces focus @overleaf/web overleaf
# the dev is suitable for running tests
@@ -79,7 +81,7 @@ COPY services/web/ /overleaf/services/web/
COPY tools/migrations/ /overleaf/tools/migrations/
# Build the latex parser
RUN cd /overleaf/services/web && npm run 'lezer-latex:generate'
RUN cd /overleaf/services/web && yarn run 'lezer-latex:generate'
# The module folders are owned as root. The node user cannot create them. Create them in advance.
RUN cd /overleaf/services/web && make create_module_Makefiles
@@ -90,7 +92,7 @@ USER node
# the webpack image has deps+src+webpack artifacts
FROM dev AS webpack
USER root
RUN OVERLEAF_CONFIG=/overleaf/services/web/config/settings.webpack.js nice npm run webpack:production
RUN OVERLEAF_CONFIG=/overleaf/services/web/config/settings.webpack.js nice yarn run webpack:production
# intermediate image for removing source maps ahead of copying into final production image
@@ -120,7 +122,7 @@ COPY tools/migrations/ /overleaf/tools/migrations/
# Omit Server Pro/CE specific scripts from SaaS image
RUN rm /overleaf/services/web/modules/server-ce-scripts -rf
RUN OVERLEAF_CONFIG=/overleaf/services/web/config/settings.overrides.saas.js nice npm run precompile-pug
RUN OVERLEAF_CONFIG=/overleaf/services/web/config/settings.overrides.saas.js nice yarn run precompile-pug
# the web image with only production dependencies but no webpack production build, for development
+27 -26
View File
@@ -99,11 +99,11 @@ test_module: test_unit_module test_acceptance_module
test_unit: test_unit_all
test_unit_all: export COMPOSE_PROJECT_NAME=unit_test_all_$(BUILD_DIR_NAME)
test_unit_all: mongo_migrations_for_tests
$(DOCKER_COMPOSE) run --rm test_unit npm run test:unit:all
$(DOCKER_COMPOSE) run --rm test_unit yarn run test:unit:all
test_unit_all_silent: export COMPOSE_PROJECT_NAME=unit_test_all_$(BUILD_DIR_NAME)
test_unit_all_silent: mongo_migrations_for_tests
$(DOCKER_COMPOSE) run --rm test_unit npm run test:unit:all:silent
$(DOCKER_COMPOSE) run --rm test_unit yarn run test:unit:all:silent
test_unit_app: export COMPOSE_PROJECT_NAME=unit_test_$(BUILD_DIR_NAME)
test_unit_app: mongo_migrations_for_tests
@@ -112,16 +112,16 @@ test_unit_app: mongo_migrations_for_tests
test_unit_parallel: export JUNIT_ROOT_SUITE_NAME = ESM unit tests - parallel
test_unit_parallel: export COMPOSE_PROJECT_NAME=unit_test_parallel_$(BUILD_DIR_NAME)
test_unit_parallel: mongo_migrations_for_tests
$(DOCKER_COMPOSE) run --rm test_unit npm run test:unit:parallel
$(DOCKER_COMPOSE) run --rm test_unit yarn run test:unit:parallel
test_unit_sequential: export JUNIT_ROOT_SUITE_NAME = ESM unit tests - sequential
test_unit_sequential: export COMPOSE_PROJECT_NAME=unit_test_sequential_$(BUILD_DIR_NAME)
test_unit_sequential: mongo_migrations_for_tests
$(DOCKER_COMPOSE) run --rm test_unit npm run test:unit:sequential
$(DOCKER_COMPOSE) run --rm test_unit yarn run test:unit:sequential
test_unit_watch: export COMPOSE_PROJECT_NAME=unit_test_watch_$(BUILD_DIR_NAME)
test_unit_watch: mongo_migrations_for_tests
$(DOCKER_COMPOSE) run --rm test_unit npm run test:unit:watch
$(DOCKER_COMPOSE) run --rm test_unit yarn run test:unit:watch
TEST_SUITES = $(sort $(filter-out \
$(wildcard test/unit/src/helpers/*), \
@@ -155,7 +155,7 @@ test_unit_module: mongo_migrations_for_tests
$(MAKE) modules/$(MODULE_NAME)/test_unit
mongo_migrations_for_tests:
$(DOCKER_COMPOSE) run --rm --workdir /overleaf/tools/migrations test_unit npm run migrations -- migrate -t saas
$(DOCKER_COMPOSE) run --rm --workdir /overleaf/tools/migrations test_unit yarn run migrations migrate -t saas
#
# Frontend tests
@@ -249,10 +249,10 @@ TEST_ACCEPTANCE_APP := \
ifeq ($(DEBUG),true)
TEST_ACCEPTANCE_DEBUG_PORT := -p 127.0.0.1:19999:19999
TEST_ACCEPTANCE_NPM_SCRIPT := npm run --silent test:acceptance:app:debug
TEST_ACCEPTANCE_YARN_SCRIPT := yarn run --silent test:acceptance:app:debug
else
TEST_ACCEPTANCE_DEBUG_PORT :=
TEST_ACCEPTANCE_NPM_SCRIPT := npm run --silent test:acceptance:app
TEST_ACCEPTANCE_YARN_SCRIPT := yarn run --silent test:acceptance:app
endif
test_acceptance_app: $(TEST_ACCEPTANCE_APP)
@@ -267,7 +267,7 @@ test_acceptance_app_server_pro: export COMPOSE_PROJECT_NAME=acceptance_test_serv
test_acceptance_app_server_pro: export OVERLEAF_CONFIG=$(CFG_SERVER_PRO)
$(TEST_ACCEPTANCE_APP):
$(DOCKER_COMPOSE) run --rm $(TEST_ACCEPTANCE_DEBUG_PORT) test_acceptance $(TEST_ACCEPTANCE_NPM_SCRIPT)
$(DOCKER_COMPOSE) run --rm $(TEST_ACCEPTANCE_DEBUG_PORT) test_acceptance $(TEST_ACCEPTANCE_YARN_SCRIPT)
$(DOCKER_COMPOSE) down -v -t 0
# We are using _make magic_ for turning these file-targets into calls to
@@ -335,7 +335,7 @@ test_acceptance_module_maybe_in_server_pro: export BASE_CONFIG=$(CFG_SERVER_PRO)
# Either the grep will find and emit the module, or exits with code 1, which
# we handle with a fallback to a noop make target.
# Run the node command in a docker compose container which provides the needed
# npm dependencies (from disk in dev-env or from the CI image in CI).
# yarn dependencies (from disk in dev-env or from the CI image in CI).
# Pick the test_unit service which is very light-weight -- the test_acceptance
# service would start mongo/redis.
$(TEST_ACCEPTANCE_MODULE_MAYBE_IN): test_acceptance_module_maybe_in_%:
@@ -465,12 +465,12 @@ ci:
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/web/data/reports:/overleaf/services/web/data/reports --volume $(MONOREPO)/node_modules/.cache/:/overleaf/node_modules/.cache/ -w /overleaf $(IMAGE_CI) npm run --silent
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) --user node node:24.14.1 npm run --silent
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/web/data/reports:/overleaf/services/web/data/reports --volume $(MONOREPO)/node_modules/.cache/:/overleaf/node_modules/.cache/ -w /overleaf $(IMAGE_CI) corepack yarn run --silent
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) --user node node:24.14.1 corepack yarn run --silent
ORG_PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN_LINT_FORMAT ?= \
docker run --rm --env BRANCH_NAME --env CI --env COMMIT_SHA --env MONOREPO --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume ${PWD}/data/reports:/overleaf/services/web/data/reports --volume $(MONOREPO)/node_modules/.cache/:/overleaf/node_modules/.cache/ ${IMAGE_CI}
docker run --rm --env BRANCH_NAME --env CI --env COMMIT_SHA --env MONOREPO --env PATH=/overleaf/node_modules/.bin:$(ORG_PATH) --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume ${PWD}/data/reports:/overleaf/services/web/data/reports --volume $(MONOREPO)/node_modules/.cache/:/overleaf/node_modules/.cache/ ${IMAGE_CI}
NODE_MODULES_PATH := ${PATH}:${PWD}/node_modules/.bin:/overleaf/services/web/node_modules/.bin
WITH_NODE_MODULES_PATH = \
@@ -515,19 +515,19 @@ $(WITH_CACHE_FOLDER): ../../node_modules/.cache/stylelint/
lint: lint_eslint
lint_eslint:
ifeq ($(CI),true)
-npm run lint -- --format json --output-file data/reports/eslint.json
-yarn run lint --format json --output-file data/reports/eslint.json
sed -i 's_"filePath":"/overleaf_"filePath":"$(MONOREPO)_g' data/reports/eslint.json
else
npm run lint
yarn run lint
endif
lint: lint_stylelint
lint_stylelint:
ifeq ($(CI),true)
-npm run lint:styles -- --formatter json --output-file data/reports/stylelint.json
-yarn run lint:styles --formatter json --output-file data/reports/stylelint.json
sed -i 's_"source":"/overleaf_"source":"$(MONOREPO)_g' data/reports/stylelint.json
else
npm run lint:styles
yarn run lint:styles
endif
lint_stylelint_fix:
@@ -561,24 +561,24 @@ lint_overleafModuleImports:
lint: typecheck_frontend
typecheck_frontend:
npm run --silent type-check
yarn run --silent type-check
lint: typecheck_backend
typecheck_backend:
npm run --silent type-check:backend
yarn run --silent type-check:backend
lint_in_docker:
$(RUN_LINT_FORMAT) make lint -j2 --output-sync
format: format_js
format_js:
$(RUN_LINTING_MONOREPO) format -- services/web
$(RUN_LINTING_MONOREPO) format services/web
format_ci:
$(RUN_LINTING_CI_MONOREPO) format -- services/web
$(RUN_LINTING_CI_MONOREPO) format services/web
format_fix:
$(RUN_LINTING_MONOREPO) format:fix -- services/web
$(RUN_LINTING_MONOREPO) format:fix services/web
format_styles:
$(RUN_LINTING_MONOREPO) format:styles
@@ -599,7 +599,7 @@ format_jenkins_fix:
$(RUN_LINTING_MONOREPO) format:jenkins:fix
format_in_docker:
$(RUN_LINT_FORMAT) npm run --prefix /overleaf format -- services/web
$(RUN_LINT_FORMAT) bash -c 'cd /overleaf && yarn run format services/web'
SHELLCHECK_OPTS = \
--shell=bash \
@@ -632,7 +632,7 @@ IMAGE_REPO_FINAL ?= $(IMAGE_REPO):$(BRANCH_NAME_TAG_SAFE)-$(BUILD_NUMBER)
IMAGE_SCRATCH ?= $(IMAGE_REPO):do-not-use-this-tag-for-deploys--it-is-used-for-early-pushes-in-ci
IMAGE_CACHE ?= $(IMAGE_REPO):cache-$(shell cat \
$(MONOREPO)/package.json \
$(MONOREPO)/package-lock.json \
$(MONOREPO)/yarn.lock \
$(MONOREPO)/libraries/access-token-encryptor/package.json \
$(MONOREPO)/libraries/eslint-plugin/package.json \
$(MONOREPO)/libraries/fetch-utils/package.json \
@@ -727,9 +727,10 @@ tar:
COMPOSE_PROJECT_NAME=tar_$(BUILD_DIR_NAME) $(DOCKER_COMPOSE) down -v -t 0
build_storybook:
npm run lezer-latex:generate
yarn run lezer-latex:generate
mkdir -p data/storybook/
npm run build-storybook -- --output-dir data/storybook/$(BRANCH_NAME) --loglevel warn --quiet
rm -rf data/storybook/$(BRANCH_NAME)
yarn run build-storybook --output-dir data/storybook/$(BRANCH_NAME) --loglevel warn --quiet
storybook_index:
mkdir -p data/storybook/
+3 -3
View File
@@ -10,11 +10,11 @@ The rest of the Overleaf stack, along with information about contributing can be
### Running the app
The app runs natively using npm and Node on the local system:
The app runs natively using yarn and Node on the local system:
```
$ npm install
$ npm run start
$ yarn install
$ yarn run start
```
### Running Tests
+1 -1
View File
@@ -4,7 +4,7 @@ import { webpackConfig } from './cypress/support/webpack.cypress'
let reporterOptions = {}
if (process.env.CI) {
reporterOptions = {
reporter: '/overleaf/node_modules/cypress-multi-reporters',
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'cypress/cypress-multi-reporters.json',
},
+5 -5
View File
@@ -15,7 +15,7 @@ services:
- ./data/coverage:/overleaf/services/web/data/coverage
- ./data/reports:/overleaf/services/web/data/reports
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
command: npm run test:unit:app
command: yarn run test:unit:app
working_dir: /overleaf/services/web
env_file: docker-compose.common.env
environment:
@@ -60,7 +60,7 @@ services:
- ./data/coverage:/overleaf/services/web/data/coverage
- ./data/reports:/overleaf/services/web/data/reports
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
command: npm run test:acceptance:app
command: yarn run test:acceptance:app
depends_on:
- redis_test
- mongo
@@ -80,7 +80,7 @@ services:
driver: local
user: node
working_dir: /overleaf/services/web
command: npm run test:frontend
command: yarn run test:frontend
environment:
NODE_OPTIONS: "--unhandled-rejections=strict"
CI:
@@ -104,7 +104,7 @@ services:
volumes:
- /dev/shm/overleaf:/overleaf
- ./data/reports:/overleaf/services/web/data/reports
entrypoint: npm
entrypoint: yarn
command:
- "run"
- "cypress:run-ct"
@@ -118,7 +118,7 @@ services:
driver: local
user: node
working_dir: /overleaf/services/web
command: npm run test:writefull
command: yarn run test:writefull
volumes:
- ./data/reports:/overleaf/services/web/data/reports
environment:
+1 -1
View File
@@ -10,7 +10,7 @@ services:
- /tmp/.X11-unix:/tmp/.X11-unix
- ${XAUTHORITY:-/dev/null}:/home/node/.Xauthority
working_dir: /overleaf/services/web
entrypoint: npm
entrypoint: yarn
command: run cypress:open-ct
environment:
VERBOSE_LOGGING:
+4 -4
View File
@@ -26,7 +26,7 @@ services:
REDIS_HOST: redis_test
MONOREPO:
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
command: npm run --silent test:unit:app
command: corepack yarn run --silent test:unit:app
user: node
depends_on:
- mongo
@@ -67,7 +67,7 @@ services:
- saml
- ldap
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
command: npm run --silent test:acceptance:app
command: corepack yarn run --silent test:acceptance:app
test_frontend_jsdom:
build:
@@ -85,7 +85,7 @@ services:
MOCHA_GREP: ${MOCHA_GREP}
NODE_OPTIONS: "--unhandled-rejections=strict"
VERBOSE_LOGGING:
command: npm run --silent test:frontend
command: corepack yarn run --silent test:frontend
user: node
test_frontend_ct:
@@ -123,7 +123,7 @@ services:
JUNIT_ROOT_SUITE_NAME:
NODE_OPTIONS: "--unhandled-rejections=strict"
VERBOSE_LOGGING:
command: npm run --silent test:writefull
command: corepack yarn run --silent test:writefull
user: node
redis_test:
@@ -40,7 +40,7 @@ From the monorepo root:
make install
# manually
bin/npm -w services/web run 'lezer-latex:generate'
bin/yarn -w services/web run 'lezer-latex:generate'
```
## Tests
@@ -65,7 +65,7 @@ some example files in the test suite, at `web/test/unit/src/LezerLatex/examples/
For example:
```sh
bin/npm -w services/web run 'lezer-latex:run' web/test/unit/src/LezerLatex/examples/amsmath.tex
bin/yarn -w services/web run 'lezer-latex:run' web/test/unit/src/LezerLatex/examples/amsmath.tex
```
If you omit the file path, the default file (`examples/demo.tex`) will be run.
+61 -61
View File
@@ -8,19 +8,19 @@
},
"scripts": {
"test:acceptance:run_dir": "bin/test_acceptance_run_dir",
"test:acceptance:app": "npm run test:acceptance:run_dir -- test/acceptance/src",
"test:acceptance:app:debug": "npm run test:acceptance:debug:run_dir -- test/acceptance/src",
"test:acceptance:debug:run_dir": "mocha --recursive --timeout 25000 --grep=$MOCHA_GREP --require test/acceptance/bootstrap.js --inspect=0.0.0.0:19999 --inspect-brk",
"test:acceptance:app": "yarn run test:acceptance:run_dir -- test/acceptance/src",
"test:acceptance:app:debug": "yarn run test:acceptance:debug:run_dir -- test/acceptance/src",
"test:acceptance:debug:run_dir": "mocha --recursive --timeout 25000 --grep=${MOCHA_GREP:-} --require test/acceptance/bootstrap.js --inspect=0.0.0.0:19999 --inspect-brk",
"test:unit:run_dir": "bin/test_unit_run_dir",
"test:unit:all": "npm run test:unit:run_dir -- test/unit/src modules/*/test/unit/src",
"test:unit:all:silent": "npm run test:unit:all -- --reporter dot",
"test:unit:app": "npm run test:unit:run_dir -- test/unit/src",
"test:unit:all": "yarn run test:unit:run_dir -- test/unit/src modules/*/test/unit/src",
"test:unit:all:silent": "yarn run test:unit:all -- --reporter dot",
"test:unit:app": "yarn run test:unit:run_dir -- test/unit/src",
"test:unit": "vitest run",
"test:unit:parallel": "vitest run --project=Parallel",
"test:unit:sequential": "vitest run --project=Sequential",
"test:unit:watch": "vitest",
"test:frontend": "NODE_ENV=test TZ=GMT mocha --recursive --timeout 5000 --exit --extension js,jsx,mjs,ts,tsx --grep=$MOCHA_GREP --require test/frontend/bootstrap.js --ignore '**/*.spec.{js,jsx,ts,tsx}' --ignore '**/helpers/**/*.{js,jsx,ts,tsx}' test/frontend modules/*/test/frontend",
"test:frontend:coverage": "c8 --all --include 'frontend/js' --include 'modules/*/frontend/js' --exclude 'frontend/js/vendor' --reporter=lcov --reporter=text-summary npm run test:frontend",
"test:frontend": "NODE_ENV=test TZ=GMT mocha --recursive --timeout 5000 --exit --extension js,jsx,mjs,ts,tsx --grep=${MOCHA_GREP:-} --require test/frontend/bootstrap.js --ignore '**/*.spec.{js,jsx,ts,tsx}' --ignore '**/helpers/**/*.{js,jsx,ts,tsx}' test/frontend modules/*/test/frontend",
"test:frontend:coverage": "c8 --all --include 'frontend/js' --include 'modules/*/frontend/js' --exclude 'frontend/js/vendor' --reporter=lcov --reporter=text-summary yarn run test:frontend",
"test:writefull": "vitest --run --config modules/writefull/frontend/js/integration/vitest.config.ts",
"start": "node app.mjs",
"nodemon": "node --watch app.mjs --watch-locales",
@@ -35,10 +35,10 @@
"type-check:backend": "tsc -p tsconfig.backend.json --noEmit",
"extract-translations": "i18next-scanner",
"convert-themes": "node frontend/js/features/source-editor/themes/scripts/convert.js",
"cypress:open-ct": "OVERLEAF_CONFIG=$PWD/config/settings.webpack.js cypress open --component",
"cypress:run-ct": "OVERLEAF_CONFIG=$PWD/config/settings.webpack.js cypress run --component --browser chrome",
"cypress:docker:open-ct": "USER_UID=$(id -u) USER_GID=$(id -g) docker compose -f docker-compose.cypress.yml run --rm cypress run cypress:open-ct",
"cypress:docker:run-ct": "USER_UID=$(id -u) USER_GID=$(id -g) docker compose -f docker-compose.cypress.yml run --rm cypress run cypress:run-ct --browser chrome",
"cypress:open-ct": "OVERLEAF_CONFIG=$(pwd)/config/settings.webpack.js cypress open --component",
"cypress:run-ct": "OVERLEAF_CONFIG=$(pwd)/config/settings.webpack.js cypress run --component --browser chrome",
"cypress:docker:open-ct": "USER_UID=$(id -u) USER_GID=$(id -g) docker compose -f docker-compose.cypress.yml run --rm cypress yarn run cypress:open-ct",
"cypress:docker:run-ct": "USER_UID=$(id -u) USER_GID=$(id -g) docker compose -f docker-compose.cypress.yml run --rm cypress yarn run cypress:run-ct --browser chrome",
"lezer-latex:generate": "node scripts/lezer-latex/generate.mjs",
"lezer-latex:run": "node scripts/lezer-latex/run.mjs",
"lezer-latex:benchmark": "node scripts/lezer-latex/benchmark.mjs",
@@ -48,24 +48,24 @@
"build-storybook": "storybook build",
"build-unfilled-fonts": "node frontend/fonts/material-symbols/build-unfilled.mjs",
"precompile-pug": "node app/src/infrastructure/Views.mjs",
"local:nodemon": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env;. ../../config/domain.env; set +a; echo $OVERLEAF_CONFIG; WEB_PORT=13000 LISTEN_ADDRESS=0.0.0.0 npm run nodemon",
"local:webpack": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env;. ../../config/domain.env; set +a; PORT=13808 OVERLEAF_CONFIG=$(pwd)/config/settings.webpack.js npm run webpack",
"local:test:acceptance:run_dir": "set -a;. $(pwd)/docker-compose.common.env;. $(pwd)/local-test.env; set +a; npm run test:acceptance:run_dir",
"local:test:acceptance:run_app": "OVERLEAF_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js npm run local:test:acceptance:run_dir -- $(pwd)/test/acceptance/src",
"local:test:acceptance:run_module": "if [ ! -d $(pwd)/modules/${MODULE}/test/acceptance ]; then echo \"Module '${MODULE}' does not have acceptance tests\"; exit 0; fi; OVERLEAF_CONFIG=$(pwd)/modules/${MODULE}/test/acceptance/config/settings.test.js BASE_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js npm run local:test:acceptance:run_dir -- $(pwd)/modules/${MODULE}/test/acceptance",
"local:test:acceptance:run_modules": "OVERLEAF_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js node $(pwd)/test/acceptance/getModuleTargets --name-only | xargs -n1 sh -c 'MODULE=$0 npm run local:test:acceptance:run_module || exit 255' $1",
"local:test:acceptance:app:saas": "OVERLEAF_APP=saas npm run local:test:acceptance:run_app",
"local:test:acceptance:app:server-pro": "OVERLEAF_APP=server-pro npm run local:test:acceptance:run_app",
"local:test:acceptance:app:server-ce": "OVERLEAF_APP=server-ce npm run local:test:acceptance:run_app",
"local:test:acceptance:app": "echo saas server-pro server-ce | xargs -n1 sh -c 'npm run local:test:acceptance:app:${0} || exit 255'",
"local:test:acceptance:modules:saas": "OVERLEAF_APP=saas npm run local:test:acceptance:run_modules",
"local:test:acceptance:modules:server-pro": "OVERLEAF_APP=server-pro npm run local:test:acceptance:run_modules",
"local:test:acceptance:modules:server-ce": "OVERLEAF_APP=server-ce npm run local:test:acceptance:run_modules",
"local:test:acceptance:modules": "echo saas server-ce server-pro | xargs -n1 sh -c 'npm run local:test:acceptance:modules:${0} || exit 255'",
"local:test:acceptance": "npm run local:test:acceptance:app && npm run local:test:acceptance:modules",
"local:test:unit": "npm run test:unit:all",
"local:test:frontend": "npm run test:frontend",
"local:test": "npm run local:test:unit && npm run local:test:frontend && npm run local:test:acceptance",
"local:nodemon": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env;. ../../config/domain.env; set +a; echo $OVERLEAF_CONFIG; WEB_PORT=13000 LISTEN_ADDRESS=0.0.0.0 yarn run nodemon",
"local:webpack": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env;. ../../config/domain.env; set +a; PORT=13808 OVERLEAF_CONFIG=$(pwd)/config/settings.webpack.js yarn run webpack",
"local:test:acceptance:run_dir": "set -a;. $(pwd)/docker-compose.common.env;. $(pwd)/local-test.env; set +a; yarn run test:acceptance:run_dir",
"local:test:acceptance:run_app": "OVERLEAF_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js yarn run local:test:acceptance:run_dir -- $(pwd)/test/acceptance/src",
"local:test:acceptance:run_module": "if [ ! -d $(pwd)/modules/${MODULE}/test/acceptance ]; then echo \"Module '${MODULE}' does not have acceptance tests\"; exit 0; fi; OVERLEAF_CONFIG=$(pwd)/modules/${MODULE}/test/acceptance/config/settings.test.js BASE_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js yarn run local:test:acceptance:run_dir -- $(pwd)/modules/${MODULE}/test/acceptance",
"local:test:acceptance:run_modules": "OVERLEAF_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js node $(pwd)/test/acceptance/getModuleTargets --name-only | xargs -n1 sh -c 'MODULE=$0 yarn run local:test:acceptance:run_module || exit 255' $1",
"local:test:acceptance:app:saas": "OVERLEAF_APP=saas yarn run local:test:acceptance:run_app",
"local:test:acceptance:app:server-pro": "OVERLEAF_APP=server-pro yarn run local:test:acceptance:run_app",
"local:test:acceptance:app:server-ce": "OVERLEAF_APP=server-ce yarn run local:test:acceptance:run_app",
"local:test:acceptance:app": "echo saas server-pro server-ce | xargs -n1 sh -c 'yarn run local:test:acceptance:app:${0} || exit 255'",
"local:test:acceptance:modules:saas": "OVERLEAF_APP=saas yarn run local:test:acceptance:run_modules",
"local:test:acceptance:modules:server-pro": "OVERLEAF_APP=server-pro yarn run local:test:acceptance:run_modules",
"local:test:acceptance:modules:server-ce": "OVERLEAF_APP=server-ce yarn run local:test:acceptance:run_modules",
"local:test:acceptance:modules": "echo saas server-ce server-pro | xargs -n1 sh -c 'yarn run local:test:acceptance:modules:${0} || exit 255'",
"local:test:acceptance": "yarn run local:test:acceptance:app && yarn run local:test:acceptance:modules",
"local:test:unit": "yarn run test:unit:all",
"local:test:frontend": "yarn run test:frontend",
"local:test": "yarn run local:test:unit && yarn run local:test:frontend && yarn run local:test:acceptance",
"knip": "knip --config knip.ts"
},
"browserslist": [
@@ -84,19 +84,19 @@
"@google-cloud/storage": "^7.19.0",
"@node-oauth/oauth2-server": "^5.3.0",
"@node-saml/passport-saml": "^5.1.0",
"@overleaf/access-token-encryptor": "*",
"@overleaf/fetch-utils": "*",
"@overleaf/logger": "*",
"@overleaf/metrics": "*",
"@overleaf/migrations": "*",
"@overleaf/mongo-utils": "*",
"@overleaf/o-error": "*",
"@overleaf/object-persistor": "*",
"@overleaf/promise-utils": "*",
"@overleaf/redis-wrapper": "*",
"@overleaf/settings": "*",
"@overleaf/stream-utils": "*",
"@overleaf/validation-tools": "*",
"@overleaf/access-token-encryptor": "workspace:*",
"@overleaf/fetch-utils": "workspace:*",
"@overleaf/logger": "workspace:*",
"@overleaf/metrics": "workspace:*",
"@overleaf/migrations": "workspace:*",
"@overleaf/mongo-utils": "workspace:*",
"@overleaf/o-error": "workspace:*",
"@overleaf/object-persistor": "workspace:*",
"@overleaf/promise-utils": "workspace:*",
"@overleaf/redis-wrapper": "workspace:*",
"@overleaf/settings": "workspace:*",
"@overleaf/stream-utils": "workspace:*",
"@overleaf/validation-tools": "workspace:*",
"@phosphor-icons/react": "^2.1.7",
"@phosphor-icons/webcomponents": "^2.1.5",
"@slack/webhook": "^7.0.2",
@@ -140,7 +140,7 @@
"helmet": "^6.0.1",
"https-proxy-agent": "^7.0.6",
"i18next": "^23.10.0",
"i18next-fs-backend": "^2.3.1",
"i18next-fs-backend": "2.6.1",
"i18next-http-middleware": "^3.5.0",
"jose": "^4.3.8",
"json2csv": "^4.3.3",
@@ -161,7 +161,7 @@
"nodemailer": "^7.0.0",
"on-headers": "^1.0.2",
"otplib": "^12.0.1",
"overleaf-editor-core": "*",
"overleaf-editor-core": "workspace:*",
"p-limit": "^2.3.0",
"p-props": "4.0.0",
"p-queue": "^8.1.0",
@@ -177,7 +177,7 @@
"rate-limiter-flexible": "^2.4.1",
"react-hook-form": "^7.71.1",
"recurly": "^4.0.0",
"referer-parser": "github:overleaf/nodejs-referer-parser#8b8b103762d05b7be4cfa2f810e1d408be67d7bb",
"referer-parser": "patch:referer-parser@npm%3A0.0.3#~/.yarn/patches/referer-parser-npm-0.0.3.patch",
"request": "2.88.2",
"requestretry": "7.1.0",
"sanitize-html": "^2.8.1",
@@ -203,13 +203,13 @@
"@babel/preset-react": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"@babel/register": "^7.28.3",
"@codemirror/autocomplete": "github:overleaf/codemirror-autocomplete#6445cd056671c98d12d1c597ba705e11327ec4c5",
"@codemirror/autocomplete": "6.18.4",
"@codemirror/commands": "6.10.1",
"@codemirror/lang-markdown": "6.5.0",
"@codemirror/lang-python": "6.2.1",
"@codemirror/language": "6.12.1",
"@codemirror/lint": "6.9.2",
"@codemirror/search": "github:overleaf/codemirror-search#04380a528c339cd4b78fb10b3ef017f657ec17bd",
"@codemirror/search": "6.5.8",
"@codemirror/state": "6.5.4",
"@codemirror/view": "6.38.6",
"@floating-ui/react": "^0.27.5",
@@ -222,9 +222,9 @@
"@lezer/markdown": "1.6.3",
"@overleaf/codemirror-tree-view": "^0.1.3",
"@overleaf/dictionaries": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.3.tar.gz",
"@overleaf/eslint-plugin": "*",
"@overleaf/ranges-tracker": "*",
"@overleaf/stream-utils": "*",
"@overleaf/eslint-plugin": "workspace:*",
"@overleaf/ranges-tracker": "workspace:*",
"@overleaf/stream-utils": "workspace:*",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.16",
"@pollyjs/adapter-node-http": "^6.0.6",
"@pollyjs/core": "^6.0.6",
@@ -275,13 +275,13 @@
"@types/utf-8-validate": "^5.0.2",
"@types/uuid": "^9.0.8",
"@uppy/core": "^3.8.0",
"@uppy/dashboard": "^3.7.1",
"@uppy/drag-drop": "^3.0.3",
"@uppy/file-input": "^3.0.4",
"@uppy/progress-bar": "^3.0.4",
"@uppy/react": "^3.2.1",
"@uppy/dashboard": "3.7.1",
"@uppy/drag-drop": "3.0.3",
"@uppy/file-input": "3.0.4",
"@uppy/progress-bar": "3.0.4",
"@uppy/react": "3.2.1",
"@uppy/utils": "^5.7.0",
"@uppy/xhr-upload": "^3.6.0",
"@uppy/xhr-upload": "3.6.0",
"@vitest/coverage-istanbul": "^4.0.17",
"@vitest/eslint-plugin": "1.6.6",
"@vitest/mocker": "^4.0.15",
@@ -306,7 +306,7 @@
"chart.js": "^4.0.1",
"chartjs-adapter-moment": "^1.0.1",
"chartjs-plugin-datalabels": "^2.2.0",
"cheerio": "^1.0.0-rc.3",
"cheerio": "1.0.0-rc.10",
"classnames": "^2.2.6",
"confusing-browser-globals": "^1.0.11",
"cookie-signature": "^1.2.1",
@@ -342,7 +342,7 @@
"handlebars": "^4.7.9",
"handlebars-loader": "^1.7.3",
"html-webpack-plugin": "^5.5.3",
"i18next-scanner": "^4.4.0",
"i18next-scanner": "4.4.0",
"idb": "^8.0.0",
"inversify": "^6.2.2",
"jquery": "^3.7.1",
@@ -395,7 +395,7 @@
"rehype-sanitize": "^6.0.0",
"resolve-url-loader": "^5.0.0",
"samlp": "^7.0.2",
"sandboxed-module": "overleaf/node-sandboxed-module#cafa2d60f17ce75cc023e6f296eb8de79d92d35d",
"sandboxed-module": "2.0.4",
"sass": "^1.77.1",
"sass-loader": "^14.2.1",
"scroll-into-view-if-needed": "^2.2.25",
@@ -409,7 +409,7 @@
"stylelint-config-standard-scss": "^13.1.0",
"tailwindcss": "^3.4.4",
"terser-webpack-plugin": "^5.3.17",
"thread-loader": "^4.0.2",
"thread-loader": "patch:thread-loader@npm%3A4.0.2#~/.yarn/patches/thread-loader-npm-4.0.2-dab5735f54.patch",
"timekeeper": "^2.2.0",
"to-string-loader": "^1.2.0",
"ts-loader": "^9.5.2",
+1 -1
View File
@@ -1,6 +1,6 @@
A nodejs tool for reading plans prices from csv files and creating JSON objects.
Run `npm install` in order to install the dependencies.
Run `yarn install` in order to install the dependencies.
The scripts will put the output results into the `output` folder.
+4 -1
View File
@@ -45,5 +45,8 @@
"cypress",
"types"
],
"exclude": ["**/*.min.js"]
"exclude": [
"**/*.min.js",
"modules/writefull/frontend/js/integration/src/vite-env.d.ts"
]
}
+13 -1
View File
@@ -217,7 +217,19 @@ module.exports = {
// Compiles Sass to CSS
{
loader: 'sass-loader',
options: { sourceMap: true }, // sourceMap: true is required for resolve-url-loader
options: {
api: 'modern',
sourceMap: true, // sourceMap: true is required for resolve-url-loader
sassOptions: {
silenceDeprecations: [
// TODO: import can't be fixed until we switch to bootstrap 6
'import',
'global-builtin',
'color-functions',
'if-function',
],
},
},
},
],
},