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

fix(yarnpkg-pnp): make yarn 2 run on node 13 #550

Merged
merged 2 commits into from Oct 28, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-workflow.yml
Expand Up @@ -56,6 +56,7 @@ jobs:
- 8
- 10
- 12
- 13
platform:
- ubuntu-latest
- windows-latest
Expand All @@ -77,7 +78,6 @@ jobs:

- name: 'Build the standard bundle & plugins'
run: |
set -e
node --version
node ./scripts/run-yarn.js build:cli
node ./scripts/run-yarn.js build:plugin-exec
Expand Down
4 changes: 2 additions & 2 deletions .pnp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/yarnpkg-builder/package.json
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.0-rc.8",
"nextVersion": {
"semver": "2.0.0-rc.9",
"nonce": "2115064498229597"
"nonce": "354015226970949"
},
"bin": "./sources/boot-dev.js",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-cli/package.json
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.0-rc.10",
"nextVersion": {
"semver": "2.0.0-rc.11",
"nonce": "8031577827360037"
"nonce": "5622212548823179"
},
"main": "./sources/index.ts",
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/yarnpkg-core/package.json
Expand Up @@ -2,7 +2,8 @@
"name": "@yarnpkg/core",
"version": "2.0.0-rc.10",
"nextVersion": {
"nonce": "279189156164743"
"semver": "2.0.0-rc.11",
"nonce": "5908698566706877"
},
"main": "./sources/index.ts",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-pnp/lib/hook.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/yarnpkg-pnp/package.json
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.0-rc.6",
"nextVersion": {
"semver": "2.0.0-rc.7",
"nonce": "7116580554445175"
"nonce": "3543853331189143"
},
"main": "./sources/index.ts",
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/yarnpkg-pnp/sources/loader/applyPatch.ts
Expand Up @@ -242,14 +242,14 @@ export function applyPatch(pnpapi: PnpApi, opts: ApplyPatchOptions) {

const originalFindPath = Module._findPath;

Module._findPath = function(request: string, paths: Array<string>, isMain: boolean) {
Module._findPath = function(request: string, paths: Array<string>|null, isMain: boolean) {
if (request === `pnpapi`)
return false;

if (!enableNativeHooks)
return originalFindPath.call(Module, request, paths, isMain);

for (const path of paths) {
for (const path of paths || []) {
let resolution;

try {
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-pnp/types/module/index.d.ts
Expand Up @@ -3,7 +3,7 @@ declare namespace NodeJS {
const _cache: {[p: string]: NodeModule};
const _extensions: {[ext: string]: any};

function _findPath(request: string, paths: Array<string>, isMain: boolean): string | false;
function _findPath(request: string, paths: Array<string>|null, isMain: boolean): string | false;
function _nodeModulePaths(from: string): Array<string>;
function _resolveFilename(request: string, parent: NodeModule | null, isMain: boolean, options?: {[key: string]: any}): string;
function _load(request: string, parent: NodeModule | null, isMain: boolean): any;
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-pnpify/package.json
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.0-rc.7",
"nextVersion": {
"semver": "2.0.0-rc.8",
"nonce": "8206665822561467"
"nonce": "8532980954301309"
},
"main": "./sources/boot-dev.js",
"bin": "./sources/boot-cli-dev.js",
Expand Down