You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Chore: Upgrade to Yarn v4 (#12407)
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -59,6 +59,7 @@ docs/**/*.mustache | ||||
| .pnp.* | ||||
| .yarn/* | ||||
| !.yarn/patches | ||||
| !.yarn/joplin-empty-package | ||||
| !.yarn/plugins | ||||
| !.yarn/releases | ||||
| !.yarn/sdks | ||||
|   | ||||
							
								
								
									
										10
									
								
								.yarn/joplin-empty-package/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.yarn/joplin-empty-package/README.md
									
									
									
									
									
										Normal 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) | ||||
|  | ||||
							
								
								
									
										10
									
								
								.yarn/joplin-empty-package/package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.yarn/joplin-empty-package/package.json
									
									
									
									
									
										Normal 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
											
										
									
								
							
							
								
								
									
										875
									
								
								.yarn/releases/yarn-3.8.3.cjs
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										875
									
								
								.yarn/releases/yarn-3.8.3.cjs
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										942
									
								
								.yarn/releases/yarn-4.9.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										942
									
								
								.yarn/releases/yarn-4.9.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										11
									
								
								.yarnrc.yml
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								.yarnrc.yml
									
									
									
									
									
								
							| @@ -2,17 +2,20 @@ nmHoistingLimits: workspaces | ||||
|  | ||||
| nodeLinker: node-modules | ||||
|  | ||||
| plugins: | ||||
|   - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||||
|     spec: "@yarnpkg/plugin-workspace-tools" | ||||
| compressionLevel: mixed | ||||
| enableGlobalCache: false | ||||
|  | ||||
| yarnPath: .yarn/releases/yarn-3.8.3.cjs | ||||
| yarnPath: .yarn/releases/yarn-4.9.2.cjs | ||||
|  | ||||
| logFilters: | ||||
|  | ||||
|   # Disable useless non-actionable warnings. | ||||
|   # 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" | ||||
|   - code: YN0060 | ||||
|     level: discard | ||||
|   | ||||
| @@ -17,7 +17,6 @@ RUN corepack enable | ||||
|  | ||||
| WORKDIR /build | ||||
|  | ||||
| COPY .yarn/plugins ./.yarn/plugins | ||||
| COPY .yarn/releases ./.yarn/releases | ||||
| COPY .yarn/patches ./.yarn/patches | ||||
| COPY package.json . | ||||
|   | ||||
							
								
								
									
										19
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								package.json
									
									
									
									
									
								
							| @@ -10,14 +10,14 @@ | ||||
|   }, | ||||
|   "engines": { | ||||
|     "node": ">=18", | ||||
|     "yarn": "3.8.3" | ||||
|     "yarn": "4.9.2" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md", | ||||
|     "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_", | ||||
|     "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", | ||||
|     "buildSettingJsonSchema": "yarn workspace joplin start settingschema ../../../joplin-website/docs/schema/settings.json", | ||||
|     "buildTranslations": "node packages/tools/build-translation.js", | ||||
| @@ -53,15 +53,15 @@ | ||||
|     "setupNewRelease": "node ./packages/tools/setupNewRelease", | ||||
|     "spellcheck": "node packages/tools/spellcheck.js", | ||||
|     "tagServerLatest": "node packages/tools/tagServerLatest.js", | ||||
|     "test-ci": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test-ci", | ||||
|     "test": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test", | ||||
|     "tsc": "yarn workspaces foreach --parallel --verbose --interlaced run tsc", | ||||
|     "test-ci": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --jobs 2 run test-ci", | ||||
|     "test": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --jobs 2 run test", | ||||
|     "tsc": "yarn workspaces foreach --worktree --parallel --verbose --interlaced run tsc", | ||||
|     "updateIgnored": "node packages/tools/gulp/tasks/updateIgnoredTypeScriptBuildRun.js", | ||||
|     "updateMarkdownDoc": "node ./packages/tools/updateMarkdownDoc", | ||||
|     "updateNews": "node ./packages/tools/website/updateNews", | ||||
|     "updatePluginTypes": "./packages/generator-joplin/updateTypes.sh", | ||||
|     "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\"" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
| @@ -95,7 +95,7 @@ | ||||
|     "node-gyp": "9.4.1", | ||||
|     "nodemon": "3.1.7" | ||||
|   }, | ||||
|   "packageManager": "yarn@3.8.3", | ||||
|   "packageManager": "yarn@4.9.2", | ||||
|   "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-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", | ||||
|     "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@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/" | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -20,7 +20,7 @@ module.exports = { | ||||
|  | ||||
| 	// Do transform most packages in node_modules (transformations correct unrecognized | ||||
| 	// 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, | ||||
| }; | ||||
|   | ||||
| @@ -3,6 +3,7 @@ | ||||
|   "packageManager": "yarn@3.6.0", | ||||
|   "private": true, | ||||
|   "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/" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|   | ||||
| @@ -9,11 +9,17 @@ | ||||
|     "access": "restricted" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "tsc": "", | ||||
|     "tsc_DISABLED": "tsc --project tsconfig.json", | ||||
|     "watch": "", | ||||
|     "watch_DISABLED": "webpack --watch --config webpack.config.js --mode=development", | ||||
|     "build": "", | ||||
|     "build_DISABLED": "webpack --config webpack.config.js --mode=production", | ||||
|     "test": "", | ||||
|     "test_DISABLED": "jest", | ||||
|     "test-ci": "", | ||||
|     "test-ci_DISABLED": "yarn test", | ||||
|     "postinstall": "", | ||||
|     "postinstall_DISABLED": "yarn build" | ||||
|   }, | ||||
|   "author": "Joplin", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user