Skip to content

Commit

Permalink
chore: upgrade to yarn 3.2.0 (#3411)
Browse files Browse the repository at this point in the history
* chore: upgrade to yarn 3.2.0

* chore: semver

* fix: lint issue

* fix: import

* fix: remove type annotation
  • Loading branch information
darthtrevino committed Mar 29, 2022
1 parent 32b0bbf commit 85371da
Show file tree
Hide file tree
Showing 29 changed files with 2,901 additions and 1,705 deletions.
343 changes: 263 additions & 80 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

768 changes: 0 additions & 768 deletions .yarn/releases/yarn-3.1.1.cjs

This file was deleted.

785 changes: 785 additions & 0 deletions .yarn/releases/yarn-3.2.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarn/sdks/eslint/package.json
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "7.32.0-sdk",
"version": "8.12.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion .yarn/sdks/prettier/package.json
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "2.4.1-sdk",
"version": "2.6.1-sdk",
"main": "./index.js",
"type": "commonjs"
}
14 changes: 10 additions & 4 deletions .yarn/sdks/typescript/lib/tsserver.js
Expand Up @@ -18,6 +18,7 @@ const moduleWrapper = tsserver => {
const pnpApi = require(`pnpapi`);

const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
const isPortal = str => str.startsWith("portal:/");
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);

const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
Expand All @@ -44,7 +45,7 @@ const moduleWrapper = tsserver => {
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
if (resolved) {
const locator = pnpApi.findPackageLocator(resolved);
if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) {
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
str = resolved;
}
}
Expand Down Expand Up @@ -85,7 +86,7 @@ const moduleWrapper = tsserver => {
// everything else is up to neovim
case `neovim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = `zipfile:${str}`;
str = `zipfile://${str}`;
} break;

default: {
Expand All @@ -100,8 +101,7 @@ const moduleWrapper = tsserver => {

function fromEditorPath(str) {
switch (hostInfo) {
case `coc-nvim`:
case `neovim`: {
case `coc-nvim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
Expand All @@ -111,6 +111,12 @@ const moduleWrapper = tsserver => {
: str.replace(/^.*zipfile:/, ``);
} break;

case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
return str.replace(/^zipfile:\/\//, ``);
} break;

case `vscode`:
default: {
return process.platform === `win32`
Expand Down
14 changes: 10 additions & 4 deletions .yarn/sdks/typescript/lib/tsserverlibrary.js
Expand Up @@ -18,6 +18,7 @@ const moduleWrapper = tsserver => {
const pnpApi = require(`pnpapi`);

const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
const isPortal = str => str.startsWith("portal:/");
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);

const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
Expand All @@ -44,7 +45,7 @@ const moduleWrapper = tsserver => {
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
if (resolved) {
const locator = pnpApi.findPackageLocator(resolved);
if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) {
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
str = resolved;
}
}
Expand Down Expand Up @@ -85,7 +86,7 @@ const moduleWrapper = tsserver => {
// everything else is up to neovim
case `neovim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = `zipfile:${str}`;
str = `zipfile://${str}`;
} break;

default: {
Expand All @@ -100,8 +101,7 @@ const moduleWrapper = tsserver => {

function fromEditorPath(str) {
switch (hostInfo) {
case `coc-nvim`:
case `neovim`: {
case `coc-nvim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
Expand All @@ -111,6 +111,12 @@ const moduleWrapper = tsserver => {
: str.replace(/^.*zipfile:/, ``);
} break;

case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
return str.replace(/^zipfile:\/\//, ``);
} break;

case `vscode`:
default: {
return process.platform === `win32`
Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/typescript/package.json
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "4.5.5-sdk",
"version": "4.6.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}
16 changes: 16 additions & 0 deletions .yarn/versions/40a81c39.yml
@@ -0,0 +1,16 @@
releases:
"@react-dnd/asap": patch
"@react-dnd/invariant": patch
"@react-dnd/shallowequal": patch
dnd-core: patch
react-dnd: patch
react-dnd-examples: patch
react-dnd-html5-backend: patch
react-dnd-test-backend: patch
react-dnd-test-utils: patch
react-dnd-touch-backend: patch

declined:
- react-dnd-documentation
- test-suite-cra
- test-suite-vite
8 changes: 4 additions & 4 deletions .yarnrc.yml
Expand Up @@ -11,13 +11,13 @@ packageExtensions:
alex@*:
dependencies:
supports-color: ^7.2.0
babel-preset-react-app@*:
dependencies:
"@babel/plugin-proposal-private-property-in-object": "*"
gatsby@*:
dependencies:
"@babel/types": ^7.12.0
babel-plugin-styled-components: ^1.11.1
babel-preset-react-app@*:
dependencies:
"@babel/plugin-proposal-private-property-in-object": "*"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
Expand All @@ -29,4 +29,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"

yarnPath: .yarn/releases/yarn-3.1.1.cjs
yarnPath: .yarn/releases/yarn-3.2.0.cjs
46 changes: 23 additions & 23 deletions package.json
Expand Up @@ -63,46 +63,46 @@
"devDependencies": {
"@commitlint/cli": "^13.2.1",
"@commitlint/config-conventional": "^13.2.0",
"@swc/core": "^1.2.136",
"@swc/jest": "^0.2.17",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@swc/core": "^1.2.161",
"@swc/jest": "^0.2.20",
"@testing-library/jest-dom": "^5.16.3",
"@testing-library/react": "^12.1.4",
"@tsconfig/strictest": "^1.0.0",
"@types/jest": "^27.0.3",
"@types/node": "^14.17.19",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@types/testing-library__jest-dom": "^5.14.1",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"alex": "^9.1.0",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.23",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"@types/testing-library__jest-dom": "^5.14.3",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"alex": "^9.1.1",
"conventional-changelog-cli": "^2.1.1",
"dnd-core": "workspace:packages/dnd-core",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^6.0.0",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.0",
"eslint-plugin-no-for-of-loops": "^1.0.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.26.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^7.0.2",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^7.0.4",
"inquirer": "^7.3.3",
"jest": "~27.4.7",
"lint-staged": "^11.1.2",
"jest": "~27.5.1",
"lint-staged": "^11.2.6",
"markdown-spellcheck": "^1.3.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.4.1",
"prettier": "^2.6.1",
"react-dnd": "workspace:packages/react-dnd",
"react-dnd-examples": "workspace:packages/examples",
"react-dnd-html5-backend": "workspace:packages/backend-html5",
"react-dnd-test-backend": "workspace:packages/backend-test",
"react-dnd-test-utils": "workspace:packages/test-utils",
"react-dnd-touch-backend": "workspace:packages/backend-touch",
"typescript": "^4.5.5"
"typescript": "^4.6.3"
},
"resolutions": {
"@types/react": "17.0.17",
"@types/react-dom": "17.0.9"
},
"packageManager": "yarn@3.1.1"
"packageManager": "yarn@3.2.0"
}
8 changes: 4 additions & 4 deletions packages/backend-html5/package.json
Expand Up @@ -27,11 +27,11 @@
"dnd-core": "workspace:packages/dnd-core"
},
"devDependencies": {
"@swc/cli": "^0.1.55",
"@swc/core": "^1.2.136",
"@types/jest": "^27.4.0",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.161",
"@types/jest": "^27.4.1",
"npm-run-all": "^4.1.5",
"shx": "^0.3.4",
"typescript": "^4.5.5"
"typescript": "^4.6.3"
}
}
6 changes: 3 additions & 3 deletions packages/backend-test/package.json
Expand Up @@ -27,10 +27,10 @@
"dnd-core": "workspace:packages/dnd-core"
},
"devDependencies": {
"@swc/cli": "^0.1.55",
"@swc/core": "^1.2.136",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.161",
"npm-run-all": "^4.1.5",
"shx": "^0.3.4",
"typescript": "^4.5.5"
"typescript": "^4.6.3"
}
}
8 changes: 4 additions & 4 deletions packages/backend-touch/package.json
Expand Up @@ -29,11 +29,11 @@
"dnd-core": "workspace:packages/dnd-core"
},
"devDependencies": {
"@swc/cli": "^0.1.55",
"@swc/core": "^1.2.136",
"@types/jest": "^27.4.0",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.161",
"@types/jest": "^27.4.1",
"npm-run-all": "^4.1.5",
"shx": "^0.3.4",
"typescript": "^4.5.5"
"typescript": "^4.6.3"
}
}
10 changes: 5 additions & 5 deletions packages/dnd-core/package.json
Expand Up @@ -26,17 +26,17 @@
"dependencies": {
"@react-dnd/asap": "workspace:packages/util-asap",
"@react-dnd/invariant": "workspace:packages/util-invariant",
"redux": "^4.1.1"
"redux": "^4.1.2"
},
"devDependencies": {
"@swc/cli": "^0.1.55",
"@swc/core": "^1.2.136",
"@types/jest": "^27.4.0",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.161",
"@types/jest": "^27.4.1",
"@types/setimmediate": "^1.0.2",
"npm-run-all": "^4.1.5",
"react-dnd-test-backend": "portal:../backend-test",
"setimmediate": "^1.0.5",
"shx": "^0.3.4",
"typescript": "^4.5.5"
"typescript": "^4.6.3"
}
}
22 changes: 11 additions & 11 deletions packages/docsite/package.json
Expand Up @@ -29,14 +29,14 @@
"react-dnd-test-backend": "workspace:packages/backend-test",
"react-dnd-touch-backend": "workspace:packages/backend-touch",
"react-dom": "^17.0.2",
"react-error-overlay": "^6.0.9",
"react-error-overlay": "^6.0.10",
"react-helmet": "^6.1.0",
"react-is": "17.0.2",
"react-tabs": "^3.2.2",
"react-tabs": "^3.2.3",
"react-typography": "^0.16.20",
"rehype-react": "^6.2.1",
"shallow-compare": "^1.2.2",
"styled-components": "^5.3.3",
"styled-components": "^5.3.5",
"typography": "^0.16.21",
"typography-theme-github": "^0.16.19"
},
Expand All @@ -52,18 +52,18 @@
"not op_mini all"
],
"devDependencies": {
"@babel/plugin-transform-react-jsx": "^7.16.7",
"@babel/plugin-transform-react-jsx": "^7.17.3",
"@types/query-string": "^6.3.0",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@types/react-helmet": "^6.1.2",
"@types/react-tabs": "^2.3.3",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"@types/react-helmet": "^6.1.5",
"@types/react-tabs": "^2.3.4",
"@types/rehype-react": "^4.0.0",
"@types/styled-components": "^5.1.14",
"@types/styled-components": "^5.1.24",
"babel-plugin-styled-components": "^1.13.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.4.1",
"prop-types": "^15.7.2",
"prettier": "^2.6.1",
"prop-types": "^15.8.1",
"react-refresh": "^0.9.0",
"shx": "^0.3.4"
},
Expand Down
18 changes: 9 additions & 9 deletions packages/examples/package.json
Expand Up @@ -30,20 +30,20 @@
"react-frame-component": "^4.1.3"
},
"devDependencies": {
"@swc/cli": "^0.1.55",
"@swc/core": "^1.2.136",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.161",
"@testing-library/jest-dom": "^5.16.3",
"@testing-library/react": "^12.1.4",
"@types/faker": "^5.5.8",
"@types/jest": "^27.4.0",
"@types/lodash": "^4.14.174",
"@types/node": "^14.17.19",
"@types/react": "^17.0.38",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.180",
"@types/node": "^17.0.23",
"@types/react": "^17.0.43",
"npm-run-all": "^4.1.5",
"react": "^17.0.2",
"react-dnd-test-utils": "workspace:packages/test-utils",
"shx": "^0.3.4",
"typescript": "^4.5.5"
"typescript": "^4.6.3"
},
"peerDependencies": {
"@types/node": ">= 12",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/04-sortable/stress-test/Card.tsx
Expand Up @@ -16,7 +16,7 @@ export interface CardProps {
moveCard: (draggedId: string, id: string) => void
}

export const Card: FC<CardProps> = memo(({ id, text, moveCard }) => {
export const Card: FC<CardProps> = memo(function Card({ id, text, moveCard }) {
const ref = useRef(null)
const [{ isDragging, handlerId }, connectDrag] = useDrag({
type: ItemTypes.CARD,
Expand Down

0 comments on commit 85371da

Please sign in to comment.