Skip to content

Commit

Permalink
Updates got, switches tsc -> babel
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis committed Dec 30, 2019
1 parent 1bc42e1 commit d54c40c
Show file tree
Hide file tree
Showing 146 changed files with 441 additions and 1,585 deletions.
861 changes: 164 additions & 697 deletions .pnp.js

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions .vscode/pnpify/typescript/lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ const absRootPath = dirname(absPnpApiPath);
// Setup the environment to be able to require typescript/lib/tsserver
require(absPnpApiPath).setup();

const pnpifyResolution = require.resolve(`@yarnpkg/pnpify`, {paths: [absRootPath]});
const moduleResolution = require.resolve(`typescript/lib/tsserver`, {paths: [absRootPath]});

// Prepare the environment (to be ready in case of child_process.spawn etc)
process.env.NODE_OPTIONS = process.env.NODE_OPTIONS || ``;
process.env.NODE_OPTIONS += ` -r ${absPnpApiPath}`;
process.env.NODE_OPTIONS += ` -r ${pnpifyResolution}`;

// Apply PnPify to the current process
require(pnpifyResolution).patchFs();

// Defer to the real typescript/lib/tsserver your application uses
module.exports = require(moduleResolution);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/@types-chalk-npm-2.2.0-aa14c60d4f-1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/@types-execa-npm-0.9.0-63e2ba33d9-1.zip
Binary file not shown.
Binary file removed .yarn/cache/@types-faker-npm-4.1.4-cfb1688cd6-1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/@types-jest-npm-24.0.18-657bdae65d-1.zip
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/@types-joi-npm-13.6.3-90d58d08c5-1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/@types-klaw-npm-3.0.0-edc61311f0-1.zip
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/@types-mkdirp-npm-0.5.2-8180a91a82-1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/get-stream-npm-5.1.0-29a3aa3558-1.zip
Binary file not shown.
Binary file added .yarn/cache/got-npm-10.2.0-df3a20ea88-1.zip
Binary file not shown.
Binary file removed .yarn/cache/got-npm-9.6.0-80edc15fd0-1.zip
Binary file not shown.
Binary file removed .yarn/cache/humanize-ms-npm-1.2.1-e942bd7329-1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/p-cancelable-npm-1.0.0-647b1074d1-1.zip
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/redux-saga-npm-0.16.2-56e1d460b1-1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/type-fest-npm-0.8.1-351ad028fe-1.zip
Binary file not shown.
7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,16 @@ packageExtensions:
"@gatsbyjs/[email protected]":
peerDependencies:
"@babel/core": "*"
"cacheable-lookup@*":
dependencies:
"@types/keyv": "*"
"gatsby-plugin-favicon@*":
peerDependencies:
"webpack": "*"
"got@*":
dependencies:
"@types/keyv": "*"
"@types/responselike": "*"
"react-instantsearch-core@*":
peerDependenciesMeta:
"algoliasearch":
Expand Down
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
`@babel/preset-react`,
],
ignore: [
`**/*.d.ts`,
`packages/yarnpkg-libzip/sources/libzip.js`,
],
};
54 changes: 3 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,57 +17,9 @@
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
"@babel/register": "^7.5.5",
"@types/camelcase": "5.2.0",
"@types/chalk": "2.2.0",
"@types/comment-json": "^1.1.1",
"@types/cross-spawn": "6.0.0",
"@types/dateformat": "^1.0.1",
"@types/diff": "^4.0.2",
"@types/emscripten": "^1.38.0",
"@types/eslint": "4.16.6",
"@types/eventemitter3": "^2.0.2",
"@types/execa": "^0.9.0",
"@types/faker": "^4.1.4",
"@types/filesize": "4.1.0",
"@types/fs-extra": "^5.0.4",
"@types/git-url-parse": "9.0.0",
"@types/got": "^8.3.4",
"@types/hard-source-webpack-plugin": "1.0.1",
"@types/inquirer": "^0.0.43",
"@types/invariant": "^2.2.30",
"@types/is-ci": "^2.0.0",
"@types/jest": "^24.0.18",
"@types/joi": "^13.6.0",
"@types/klaw": "^3.0.0",
"@types/left-pad": "1.2.0",
"@types/lockfile": "^1.0.0",
"@types/lodash": "^4.14.136",
"@types/micromatch": "^3.1.0",
"@types/minimatch": "^3.0.3",
"@types/mkdirp": "^0.5.2",
"@types/node": "^12.12.8",
"@types/node-emoji": "^1.8.0",
"@types/node-fetch": "^2.1.2",
"@types/promise.prototype.finally": "^2.0.3",
"@types/react": "^16.8.0",
"@types/react-redux": "^7.1.2",
"@types/redux-saga": "^0.10.5",
"@types/request": "^2.47.1",
"@types/semver": "^6.0.2",
"@types/ssri": "^6.0.1",
"@types/stream-to-promise": "^2.2.0",
"@types/supports-color": "^5.3.0",
"@types/tar": "^4.0.0",
"@types/tar-fs": "^1.16.1",
"@types/tar-stream": "1.6.0",
"@types/terser-webpack-plugin": "^1.2.1",
"@types/tmp": "^0.0.33",
"@types/treeify": "^1.0.0",
"@types/tunnel": "^0.0.0",
"@types/webpack": "^4.32.1",
"@types/webpack-merge": "^4.1.5",
"@types/webpack-sources": "^0.1.5",
"@types/yup": "0.26.12",
"@types/jest": "^24.0.25",
"@types/node": "^13.1.1",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"@typescript-eslint/parser": "^2.13.0",
"@yarnpkg/cli": "workspace:^2.0.0-rc.19",
Expand Down Expand Up @@ -106,7 +58,7 @@
}
},
"scripts": {
"build:compile": "rm -rf \"$0\"/lib && mkdir -p \"$0\"/lib && rsync -a --include '*.d.ts' --exclude '*.ts' \"$0\"/sources/ \"$0\"/lib/ && pnpify tsc -p \"$0\"",
"build:compile": "rm -rf \"$0\"/lib && mkdir -p \"$0\"/lib && babel \"$0\"/sources --out-dir \"$0\"/lib --copy-files --extensions .js,.ts",
"gen-tssdk": "pnpify --sdk scripts",
"release:all": "./scripts/release.sh",
"test:lint": "eslint \"packages/**/@(sources|tests)/**/!(libzip).@(tsx|ts|js)\"",
Expand Down
3 changes: 0 additions & 3 deletions packages/acceptance-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,5 @@
"repository": {
"type": "git",
"url": "ssh://[email protected]/yarnpkg/berry.git"
},
"devDependencies": {
"@types/node": "^12.12.8"
}
}
1 change: 1 addition & 0 deletions packages/acceptance-tests/pkg-tests-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"main": "./sources/index.ts",
"dependencies": {
"@types/invariant": "^2.2.30",
"@types/klaw": "^2.0.0",
"@types/minimatch": "^3.0.3",
"@types/semver": "^6.0.2",
"@types/tar-fs": "^1.16.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ export const startPackageServer = (): Promise<string> => {

const {username} = parsedRequest;
const otp = request.headers['npm-otp'];
const user = validLogins[username];

const user = validLogins[username];
if (!user)
return processError(response, 401, `Unauthorized`);

Expand Down Expand Up @@ -452,7 +452,7 @@ export const startPackageServer = (): Promise<string> => {
const {authorization} = req.headers;
if (authorization != null) {
if (!validAuthorizations.includes(authorization)) {
sendError(res, 403, `Forbidden`);
sendError(res, 401, `Invalid token`);
return;
}
} else if (needsAuth(parsedRequest)) {
Expand Down
3 changes: 1 addition & 2 deletions packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"url": "ssh://[email protected]/yarnpkg/berry.git"
},
"devDependencies": {
"@types/babel__core": "7.1.3",
"@types/node": "^12.12.8"
"@types/babel__core": "7.1.3"
}
}
1 change: 0 additions & 1 deletion packages/plugin-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"@yarnpkg/plugin-patch": "^2.0.0-rc.0"
},
"devDependencies": {
"@types/node": "^12.12.8",
"@yarnpkg/core": "workspace:^2.0.0-rc.15",
"@yarnpkg/plugin-patch": "workspace:^2.0.0-rc.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-constraints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"devDependencies": {
"@types/lodash": "^4.14.136",
"@types/node": "^12.12.8",
"@yarnpkg/cli": "workspace:^2.0.0-rc.19",
"@yarnpkg/core": "workspace:^2.0.0-rc.15"
},
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-constraints/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-dlx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@yarnpkg/core": "^2.0.0-rc.15"
},
"devDependencies": {
"@types/node": "^12.12.8",
"@types/tmp": "^0.0.33",
"@yarnpkg/cli": "workspace:^2.0.0-rc.19",
"@yarnpkg/core": "workspace:^2.0.0-rc.15"
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-dlx/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"devDependencies": {
"@types/inquirer": "^0.0.43",
"@types/node": "^12.12.8",
"@types/semver": "^6.0.2",
"@types/treeify": "^1.0.0",
"@yarnpkg/cli": "workspace:^2.0.0-rc.19",
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-essentials/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-exec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"@yarnpkg/core": "^2.0.0-rc.15"
},
"devDependencies": {
"@types/node": "^12.12.8",
"@types/tmp": "^0.0.33",
"@yarnpkg/core": "workspace:^2.0.0-rc.15",
"typescript": "^3.7.4"
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-exec/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"@yarnpkg/core": "^2.0.0-rc.15"
},
"devDependencies": {
"@types/node": "^12.12.8",
"@yarnpkg/core": "workspace:^2.0.0-rc.15"
},
"repository": {
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-file/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@yarnpkg/core": "^2.0.0-rc.15"
},
"devDependencies": {
"@types/node": "^12.12.8",
"@yarnpkg/core": "workspace:^2.0.0-rc.15"
},
"repository": {
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-git/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"@yarnpkg/plugin-git": "^2.0.0-rc.11"
},
"devDependencies": {
"@types/node": "^12.12.8",
"@types/tmp": "^0.0.33",
"@yarnpkg/core": "workspace:^2.0.0-rc.15",
"@yarnpkg/plugin-git": "workspace:^2.0.0-rc.11"
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-github/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"@yarnpkg/core": "^2.0.0-rc.15"
},
"devDependencies": {
"@types/node": "^12.12.8",
"@yarnpkg/core": "workspace:^2.0.0-rc.15"
},
"repository": {
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-http/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"@yarnpkg/core": "^2.0.0-rc.15"
},
"devDependencies": {
"@types/node": "^12.12.8",
"@yarnpkg/cli": "workspace:^2.0.0-rc.19",
"@yarnpkg/core": "workspace:^2.0.0-rc.15"
},
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-init/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-interactive-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
},
"devDependencies": {
"@types/diff": "^4.0.2",
"@types/node": "^12.12.8",
"@types/react": "^16.8.0",
"@yarnpkg/builder": "workspace:^2.0.0-rc.13",
"@yarnpkg/cli": "workspace:^2.0.0-rc.19",
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-interactive-tools/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"@yarnpkg/core": "^2.0.0-rc.15"
},
"devDependencies": {
"@types/node": "^12.12.8",
"@yarnpkg/core": "workspace:^2.0.0-rc.15"
},
"repository": {
Expand Down
10 changes: 0 additions & 10 deletions packages/plugin-link/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-npm-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"devDependencies": {
"@types/inquirer": "^0.0.43",
"@types/node": "^12.12.8",
"@types/ssri": "^6.0.1",
"@yarnpkg/cli": "workspace:^2.0.0-rc.19",
"@yarnpkg/core": "workspace:^2.0.0-rc.15",
Expand Down
Loading

0 comments on commit d54c40c

Please sign in to comment.