Skip to content

Commit

Permalink
fix(yarnpkg-pnp): make yarn 2 run on node 13 (#550)
Browse files Browse the repository at this point in the history
* fix(yarnpkg-pnp): make yarn 2 run on node 13

* ci(gh-actions): make windows integration test work again
  • Loading branch information
sverweij authored and arcanis committed Oct 28, 2019
1 parent 279c3f4 commit 0eb802a
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/integration-workflow.yml
Expand Up @@ -61,6 +61,7 @@ jobs:
- 8
- 10
- 12
- 13
platform:
- ubuntu-latest
- windows-latest
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

0 comments on commit 0eb802a

Please sign in to comment.