Chore: Upgrade to Yarn v4 (#12407)

This commit is contained in:
Henry Heino 2025-06-08 06:07:10 -07:00 committed by GitHub
parent 9ffeb8c725
commit c5ca0151a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 17527 additions and 17406 deletions

1
.gitignore vendored
View File

@ -59,6 +59,7 @@ docs/**/*.mustache
.pnp.* .pnp.*
.yarn/* .yarn/*
!.yarn/patches !.yarn/patches
!.yarn/joplin-empty-package
!.yarn/plugins !.yarn/plugins
!.yarn/releases !.yarn/releases
!.yarn/sdks !.yarn/sdks

View File

@ -0,0 +1,10 @@
# @joplin/empty
An empty package. This package can be used to exclude certain dependencies from build.
For example, the `canvas` dependency is an optional dependency of `pdfjs-dist`. However, it isn't used by Joplin and can cause build to fail in certain environments. The `@joplin/empty` package can exclude `canvas` from the build by adding a resolution to `resolutions` in the top-level `package.json`. For example, resolving `canvas@npm:^2.11` to `file:./packages/empty/`.
See also:
- [Yarn docs: Manifest resolutions](https://yarnpkg.com/configuration/manifest#resolutions)
- [GitHub comment: Yarn: Ignoring packages](https://github.com/yarnpkg/yarn/issues/4611#issuecomment-1370284462)

View File

@ -0,0 +1,10 @@
{
"name": "@joplin/empty",
"version": "0.0.0",
"description": "An empty package, used as a way to exclude certain packages from build",
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/laurent22/joplin.git"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

942
.yarn/releases/yarn-4.9.2.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -2,17 +2,20 @@ nmHoistingLimits: workspaces
nodeLinker: node-modules nodeLinker: node-modules
plugins: compressionLevel: mixed
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs enableGlobalCache: false
spec: "@yarnpkg/plugin-workspace-tools"
yarnPath: .yarn/releases/yarn-3.8.3.cjs yarnPath: .yarn/releases/yarn-4.9.2.cjs
logFilters: logFilters:
# Disable useless non-actionable warnings. # Disable useless non-actionable warnings.
# https://github.com/yarnpkg/yarn/issues/4064 # https://github.com/yarnpkg/yarn/issues/4064
# e.g. "Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details."
- code: YN0086
level: discard
# eg "@joplin/app-desktop@workspace:packages/app-desktop provides react (p87edd) with version 18.2.0, which doesn't satisfy what @testing-library/react-hooks and some of its descendants request" # eg "@joplin/app-desktop@workspace:packages/app-desktop provides react (p87edd) with version 18.2.0, which doesn't satisfy what @testing-library/react-hooks and some of its descendants request"
- code: YN0060 - code: YN0060
level: discard level: discard

View File

@ -17,7 +17,6 @@ RUN corepack enable
WORKDIR /build WORKDIR /build
COPY .yarn/plugins ./.yarn/plugins
COPY .yarn/releases ./.yarn/releases COPY .yarn/releases ./.yarn/releases
COPY .yarn/patches ./.yarn/patches COPY .yarn/patches ./.yarn/patches
COPY package.json . COPY package.json .

View File

@ -10,14 +10,14 @@
}, },
"engines": { "engines": {
"node": ">=18", "node": ">=18",
"yarn": "3.8.3" "yarn": "4.9.2"
}, },
"scripts": { "scripts": {
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md", "buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
"buildScriptIndexes": "node packages/tools/gulp/tasks/buildScriptIndexesRun.js", "buildScriptIndexes": "node packages/tools/gulp/tasks/buildScriptIndexesRun.js",
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 --topological-dev run build && yarn tsc", "buildParallel": "yarn workspaces foreach --worktree --verbose --interlaced --parallel --jobs 2 --topological-dev run build && yarn tsc",
"buildPluginDoc": "cd packages/generate-plugin-doc && yarn buildPluginDoc_", "buildPluginDoc": "cd packages/generate-plugin-doc && yarn buildPluginDoc_",
"buildSequential": "yarn workspaces foreach --verbose --interlaced --topological-dev run build && yarn tsc", "buildSequential": "yarn workspaces foreach --worktree --verbose --interlaced --topological-dev run build && yarn tsc",
"buildServerDocker": "node packages/tools/buildServerDocker.js", "buildServerDocker": "node packages/tools/buildServerDocker.js",
"buildSettingJsonSchema": "yarn workspace joplin start settingschema ../../../joplin-website/docs/schema/settings.json", "buildSettingJsonSchema": "yarn workspace joplin start settingschema ../../../joplin-website/docs/schema/settings.json",
"buildTranslations": "node packages/tools/build-translation.js", "buildTranslations": "node packages/tools/build-translation.js",
@ -53,15 +53,15 @@
"setupNewRelease": "node ./packages/tools/setupNewRelease", "setupNewRelease": "node ./packages/tools/setupNewRelease",
"spellcheck": "node packages/tools/spellcheck.js", "spellcheck": "node packages/tools/spellcheck.js",
"tagServerLatest": "node packages/tools/tagServerLatest.js", "tagServerLatest": "node packages/tools/tagServerLatest.js",
"test-ci": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test-ci", "test-ci": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --jobs 2 run test-ci",
"test": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test", "test": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --jobs 2 run test",
"tsc": "yarn workspaces foreach --parallel --verbose --interlaced run tsc", "tsc": "yarn workspaces foreach --worktree --parallel --verbose --interlaced run tsc",
"updateIgnored": "node packages/tools/gulp/tasks/updateIgnoredTypeScriptBuildRun.js", "updateIgnored": "node packages/tools/gulp/tasks/updateIgnoredTypeScriptBuildRun.js",
"updateMarkdownDoc": "node ./packages/tools/updateMarkdownDoc", "updateMarkdownDoc": "node ./packages/tools/updateMarkdownDoc",
"updateNews": "node ./packages/tools/website/updateNews", "updateNews": "node ./packages/tools/website/updateNews",
"updatePluginTypes": "./packages/generator-joplin/updateTypes.sh", "updatePluginTypes": "./packages/generator-joplin/updateTypes.sh",
"validateFilenames": "node ./packages/tools/validateFilenames.js", "validateFilenames": "node ./packages/tools/validateFilenames.js",
"watch": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 999 run watch", "watch": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --jobs 999 run watch",
"watchWebsite": "nodemon --delay 1 --watch Assets/WebsiteAssets --watch packages/tools/website --watch packages/tools/website/utils --watch packages/doc-builder/build --ext md,ts,js,mustache,css,tsx,gif,png,svg --exec \"node packages/tools/website/build.js && http-server --port 8077 ../joplin-website/docs -a localhost\"" "watchWebsite": "nodemon --delay 1 --watch Assets/WebsiteAssets --watch packages/tools/website --watch packages/tools/website/utils --watch packages/doc-builder/build --ext md,ts,js,mustache,css,tsx,gif,png,svg --exec \"node packages/tools/website/build.js && http-server --port 8077 ../joplin-website/docs -a localhost\""
}, },
"devDependencies": { "devDependencies": {
@ -95,7 +95,7 @@
"node-gyp": "9.4.1", "node-gyp": "9.4.1",
"nodemon": "3.1.7" "nodemon": "3.1.7"
}, },
"packageManager": "yarn@3.8.3", "packageManager": "yarn@4.9.2",
"resolutions": { "resolutions": {
"react-native-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch", "react-native-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch",
"react-native-vosk@0.1.12": "patch:react-native-vosk@npm%3A0.1.12#./.yarn/patches/react-native-vosk-npm-0.1.12-76b1caaae8.patch", "react-native-vosk@0.1.12": "patch:react-native-vosk@npm%3A0.1.12#./.yarn/patches/react-native-vosk-npm-0.1.12-76b1caaae8.patch",
@ -113,6 +113,7 @@
"react-native-popup-menu@0.17.0": "patch:react-native-popup-menu@npm%3A0.17.0#./.yarn/patches/react-native-popup-menu-npm-0.17.0-8b745d88dd.patch", "react-native-popup-menu@0.17.0": "patch:react-native-popup-menu@npm%3A0.17.0#./.yarn/patches/react-native-popup-menu-npm-0.17.0-8b745d88dd.patch",
"pdfjs-dist@2.16.105": "patch:pdfjs-dist@npm%3A3.11.174#./.yarn/patches/pdfjs-dist-npm-3.11.174-67f2fee6d6.patch", "pdfjs-dist@2.16.105": "patch:pdfjs-dist@npm%3A3.11.174#./.yarn/patches/pdfjs-dist-npm-3.11.174-67f2fee6d6.patch",
"pdfjs-dist@*": "patch:pdfjs-dist@npm%3A3.11.174#./.yarn/patches/pdfjs-dist-npm-3.11.174-67f2fee6d6.patch", "pdfjs-dist@*": "patch:pdfjs-dist@npm%3A3.11.174#./.yarn/patches/pdfjs-dist-npm-3.11.174-67f2fee6d6.patch",
"pdfjs-dist@3.11.174": "patch:pdfjs-dist@npm%3A3.11.174#./.yarn/patches/pdfjs-dist-npm-3.11.174-67f2fee6d6.patch" "pdfjs-dist@3.11.174": "patch:pdfjs-dist@npm%3A3.11.174#./.yarn/patches/pdfjs-dist-npm-3.11.174-67f2fee6d6.patch",
"canvas@npm:^2.11.2": "link:./.yarn/joplin-empty-package/"
} }
} }

View File

@ -20,7 +20,7 @@ module.exports = {
// Do transform most packages in node_modules (transformations correct unrecognized // Do transform most packages in node_modules (transformations correct unrecognized
// import syntax) // import syntax)
transformIgnorePatterns: ['<rootDir>/node_modules/jest', '<rootDir>/node_modules/js-draw', 'node_modules/jsdom'], transformIgnorePatterns: ['<rootDir>/node_modules/jest', '<rootDir>/node_modules/js-draw', 'node_modules/jsdom', 'node_modules/whatwg-url'],
slowTestThreshold: 40, slowTestThreshold: 40,
}; };

View File

@ -3,6 +3,7 @@
"packageManager": "yarn@3.6.0", "packageManager": "yarn@3.6.0",
"private": true, "private": true,
"scripts": { "scripts": {
"tsc": "",
"buildPluginDoc_": "typedoc --exclude '../lib/models/**' --name 'Joplin Plugin API Documentation' --mode file -theme '../../Assets/PluginDocTheme/' --readme '../../Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../../../joplin-website/docs/api/references/plugin_api ../lib/services/plugins/api/" "buildPluginDoc_": "typedoc --exclude '../lib/models/**' --name 'Joplin Plugin API Documentation' --mode file -theme '../../Assets/PluginDocTheme/' --readme '../../Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../../../joplin-website/docs/api/references/plugin_api ../lib/services/plugins/api/"
}, },
"dependencies": { "dependencies": {

View File

@ -9,11 +9,17 @@
"access": "restricted" "access": "restricted"
}, },
"scripts": { "scripts": {
"tsc": "",
"tsc_DISABLED": "tsc --project tsconfig.json", "tsc_DISABLED": "tsc --project tsconfig.json",
"watch": "",
"watch_DISABLED": "webpack --watch --config webpack.config.js --mode=development", "watch_DISABLED": "webpack --watch --config webpack.config.js --mode=development",
"build": "",
"build_DISABLED": "webpack --config webpack.config.js --mode=production", "build_DISABLED": "webpack --config webpack.config.js --mode=production",
"test": "",
"test_DISABLED": "jest", "test_DISABLED": "jest",
"test-ci": "",
"test-ci_DISABLED": "yarn test", "test-ci_DISABLED": "yarn test",
"postinstall": "",
"postinstall_DISABLED": "yarn build" "postinstall_DISABLED": "yarn build"
}, },
"author": "Joplin", "author": "Joplin",

33027
yarn.lock

File diff suppressed because it is too large Load Diff