Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Yarn to 4.x #4849

Merged
merged 12 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ module.exports = {
'jsdoc/check-syntax': 'error',
'jsdoc/check-tag-names': ['error', { jsxTags: true }],
'jsdoc/check-types': 'error',
'jsdoc/newline-after-description': 'error',
'jsdoc/valid-types': 'error',
'jsdoc/check-indentation': ['off'],
},
Expand Down Expand Up @@ -474,6 +473,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
],
rules: {
'no-extra-semi': 'off',
'import/prefer-default-export': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/bundlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ jobs:
EOF
- name: Eject public packages from repo
run:
mkdir /tmp/artifacts && corepack yarn workspaces foreach --no-private
pack --install-if-needed -o /tmp/artifacts/%s-${{ github.sha }}.tgz
mkdir /tmp/artifacts && corepack yarn workspaces foreach --all
--no-private pack --install-if-needed -o /tmp/artifacts/%s-${{
github.sha }}.tgz
- name: Upload artifact
if: success()
uses: actions/upload-artifact@v4
Expand Down

This file was deleted.

550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

9 changes: 2 additions & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ changesetBaseRefs:
- upstream/main
- origin/main

compressionLevel: mixed

initScope: uppy

enableGlobalCache: false
nodeLinker: node-modules
aduh95 marked this conversation as resolved.
Show resolved Hide resolved

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: '@yarnpkg/plugin-version'
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"devDependencies": {
"@parcel/transformer-vue": "^2.9.3",
"cypress": "^13.0.0",
"cypress-terminal-report": "^5.0.0",
"cypress-terminal-report": "^6.0.0",
"deep-freeze": "^0.0.1",
"parcel": "^2.9.3",
"process": "^0.11.10",
Expand Down
2 changes: 1 addition & 1 deletion examples/aws-php/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"uppy": "workspace:*"
},
"devDependencies": {
"esbuild": "^0.17.1"
"esbuild": "^0.20.1"
},
"private": true,
"type": "module",
Expand Down
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"node": "^16.15.0 || >=18.0.0",
"yarn": "3.6.1"
},
"packageManager": "yarn@3.8.0+sha256.a1a53a88823c9f5bcd36e465791b7e490837ebf94dc6ef96282ab558a00c0811",
"packageManager": "yarn@4.1.1+sha256.f3cc0eda8e5560e529c7147565b30faa43b4e472d90e8634d7134a37c7f59781",
"workspaces": [
"examples/*",
"packages/@uppy/*",
Expand All @@ -53,35 +53,35 @@
"@babel/types": "^7.17.0",
"@types/jasmine": "file:./private/@types/jasmine",
"@types/jasminewd2": "file:./private/@types/jasmine",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@uppy-dev/remark-lint-uppy": "workspace:*",
"adm-zip": "^0.5.5",
"autoprefixer": "^10.2.6",
"babel-plugin-inline-package-json": "^2.0.0",
"chalk": "^5.0.0",
"concat-stream": "^2.0.0",
"cssnano": "^5.0.6",
"cssnano": "^6.0.6",
"dotenv": "^16.0.0",
"esbuild": "^0.20.1",
"esbuild-plugin-babel": "^0.2.3",
"eslint": "^8.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-transloadit": "^2.0.0",
"eslint-plugin-compat": "^4.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-cypress": "^3.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jest": "^27.0.0",
"eslint-plugin-jsdoc": "^40.0.0",
"eslint-plugin-jest": "^28.0.0",
"eslint-plugin-jsdoc": "^48.0.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-markdown": "^3.0.0",
"eslint-plugin-markdown": "^4.0.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prefer-import": "^0.0.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-unicorn": "^46.0.0",
"eslint-plugin-unicorn": "^52.0.0",
"github-contributors-list": "^1.2.4",
"glob": "^8.0.0",
"jsdom": "^22.1.0",
Expand All @@ -97,14 +97,14 @@
"postcss-logical": "^5.0.0",
"pre-commit": "^1.2.2",
"prettier": "^3.0.3",
"remark-cli": "^11.0.0",
"remark-cli": "^12.0.0",
"resolve": "^1.17.0",
"sass": "^1.29.0",
"start-server-and-test": "^1.14.0",
"stylelint": "^15.0.0",
"stylelint-config-rational-order": "^0.1.2",
"stylelint-config-standard": "^34.0.0",
"stylelint-config-standard-scss": "^10.0.0",
"stylelint-config-standard": "^36.0.0",
"stylelint-config-standard-scss": "^13.0.0",
"tar": "^6.1.0",
"typescript": "~5.4",
"vitest": "^1.2.1",
Expand Down Expand Up @@ -175,7 +175,8 @@
"pre-commit": "patch:pre-commit@npm:1.2.2#.yarn/patches/pre-commit-npm-1.2.2-f30af83877.patch",
"preact": "patch:preact@npm:10.10.0#.yarn/patches/preact-npm-10.10.0-dd04de05e8.patch",
"start-server-and-test": "patch:start-server-and-test@npm:1.14.0#.yarn/patches/start-server-and-test-npm-1.14.0-841aa34fdf.patch",
"stylelint-config-rational-order": "patch:stylelint-config-rational-order@npm%3A0.1.2#./.yarn/patches/stylelint-config-rational-order-npm-0.1.2-d8336e84ed.patch",
"stylelint@^9.10.1": "^16.0.0",
"stylelint-order": "^6.0.0",
"uuid@^8.3.2": "patch:uuid@npm:8.3.2#.yarn/patches/uuid-npm-8.3.2-eca0baba53.patch",
"tus-js-client": "patch:tus-js-client@npm%3A3.1.3#./.yarn/patches/tus-js-client-npm-3.1.3-dc57874d23.patch",
"resize-observer-polyfill": "patch:resize-observer-polyfill@npm%3A1.5.1#./.yarn/patches/resize-observer-polyfill-npm-1.5.1-603120e8a0.patch"
Expand Down
1 change: 0 additions & 1 deletion packages/@uppy/companion/src/server/Uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,6 @@ class Uploader {

const data = await upload.done()
return {
// @ts-expect-error For some reason `|| null` is not enough for TS
url: data?.Location || null,
extraData: {
response: {
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/companion/src/server/helpers/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ exports.getURLMeta = async (url, blockLocalIPs = false) => {
// we add random string to avoid duplicate files
const filename = response.headers['content-disposition']
? contentDisposition.parse(response.headers['content-disposition']).parameters.filename
: path.basename(response.request.requestUrl)
: path.basename(`${response.request.requestUrl}`)

// No need to get the rest of the response, as we only want header (not really relevant for HEAD, but why not)
stream.destroy()
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/compressor/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CompressorPlugin from './index.ts'

// Compressor uses browser canvas API, so need to mock compress()
// @ts-expect-error mocked
CompressorPlugin.prototype.compress = async (blob: Blob) => {
CompressorPlugin.prototype.compress = async (blob: File) => {
return {
name: `${getFileNameAndExtension(blob.name).name}.webp`,
type: 'image/webp',
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/compressor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class Compressor<
`[Image Compressor] Image ${file.id} compressed by ${prettierBytes(compressedSavingsSize)}`,
)
totalCompressedSize += compressedSavingsSize
const { name, type, size } = compressedBlob
const { name, type, size } = compressedBlob as File

const compressedFileName = getFileNameAndExtension(name)
const metaFileName = getFileNameAndExtension(file.meta.name)
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"lodash": "^4.17.21",
"mime-match": "^1.0.2",
"namespace-emitter": "^2.0.1",
"nanoid": "^4.0.0",
"nanoid": "^5.0.0",
"preact": "^10.5.13"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"is-shallow-equal": "^1.0.1",
"lodash": "^4.17.21",
"memoize-one": "^6.0.0",
"nanoid": "^4.0.0",
"nanoid": "^5.0.0",
"preact": "^10.5.13"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/@uppy/dashboard/src/utils/copyToClipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default function copyToClipboard(
document.body.appendChild(textArea)
textArea.select()

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const magicCopyFailed = (cause?: unknown) => {
document.body.removeChild(textArea)
// eslint-disable-next-line no-alert
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/store-redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"url": "git+https://github.com/transloadit/uppy.git"
},
"dependencies": {
"nanoid": "^4.0.0"
"nanoid": "^5.0.0"
},
"devDependencies": {
"redux": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/transloadit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@uppy/provider-views": "workspace:^",
"@uppy/tus": "workspace:^",
"@uppy/utils": "workspace:^",
"component-emitter": "^1.2.1"
"component-emitter": "^2.0.0"
},
"peerDependencies": {
"@uppy/core": "workspace:^"
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@uppy/companion-client": "workspace:^",
"@uppy/utils": "workspace:^",
"nanoid": "^4.0.0",
"nanoid": "^5.0.0",
"preact": "^10.5.13"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion private/locale-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"chalk": "^5.0.0",
"dedent": "^0.7.0",
"dedent": "^1.0.0",
"glob": "^8.0.0"
}
}
2 changes: 0 additions & 2 deletions private/release/getUpToDateRefsFromGitHub.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'node-fetch'

import { spawnSync } from 'node:child_process'
import prompts from 'prompts'
import { TARGET_BRANCH, REPO_NAME, REPO_OWNER, STABLE_BRANCH } from './config.js'
Expand Down
1 change: 0 additions & 1 deletion private/release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"type": "module",
"devDependencies": {
"globby": "^13.0.0",
"node-fetch": "^3.1.0",
"prompts": "^2.4.2"
},
"scripts": {
Expand Down
44 changes: 22 additions & 22 deletions private/remark-lint-uppy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
"version": "0.0.0",
"main": "index.js",
"dependencies": {
"mdast-comment-marker": "^2.1.0",
"remark-frontmatter": "^4.0.0",
"mdast-comment-marker": "^3.0.0",
"remark-frontmatter": "^5.0.0",
"remark-lint": "^9.0.0",
"remark-lint-emphasis-marker": "^3.0.0",
"remark-lint-final-newline": "^2.0.0",
"remark-lint-hard-break-spaces": "^3.0.0",
"remark-lint-emphasis-marker": "^4.0.0",
"remark-lint-final-newline": "^3.0.0",
"remark-lint-hard-break-spaces": "^4.0.0",
"remark-lint-no-auto-link-without-protocol": "^3.1.0",
"remark-lint-no-blockquote-without-marker": "^5.0.0",
"remark-lint-no-duplicate-definitions": "^3.0.0",
"remark-lint-no-heading-content-indent": "^4.0.0",
"remark-lint-no-blockquote-without-marker": "^6.0.0",
"remark-lint-no-duplicate-definitions": "^4.0.0",
"remark-lint-no-heading-content-indent": "^5.0.0",
"remark-lint-no-inline-padding": "^4.0.0",
"remark-lint-no-literal-urls": "^3.0.0",
"remark-lint-no-shortcut-reference-image": "^3.1.0",
"remark-lint-no-shortcut-reference-link": "^3.1.0",
"remark-lint-no-undefined-references": "^4.0.0",
"remark-lint-no-unused-definitions": "^3.1.0",
"remark-lint-ordered-list-marker-style": "^3.1.0",
"remark-lint-strong-marker": "^3.1.0",
"remark-retext": "^5.0.0",
"retext-english": "^4.0.0",
"retext-equality": "^6.2.0",
"retext-profanities": "^7.1.0",
"retext-quotes": "^5.0.0",
"retext-simplify": "^7.0.0",
"retext-syntax-mentions": "^3.1.0",
"remark-lint-no-literal-urls": "^4.0.0",
"remark-lint-no-shortcut-reference-image": "^4.0.0",
"remark-lint-no-shortcut-reference-link": "^4.0.0",
"remark-lint-no-undefined-references": "^5.0.0",
"remark-lint-no-unused-definitions": "^4.0.0",
"remark-lint-ordered-list-marker-style": "^4.0.0",
"remark-lint-strong-marker": "^4.0.0",
"remark-retext": "^6.0.0",
"retext-english": "^5.0.0",
"retext-equality": "^7.0.0",
"retext-profanities": "^8.0.0",
"retext-quotes": "^6.0.0",
"retext-simplify": "^8.0.0",
"retext-syntax-mentions": "^4.0.0",
"unified": "^11.0.0",
"unified-message-control": "^4.0.0"
},
Expand Down
Loading