Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
fixes for globby. test fixes. bump pkg-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
igorklopov committed Dec 8, 2019
1 parent 89a1a49 commit 718d974
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 55 deletions.
4 changes: 2 additions & 2 deletions lib/refiner.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { STORE_LINKS, retrieveDenominator,
substituteDenominator } from '../prelude/common.js';
import path from 'path';

const win32 = process.platform === 'win32';

function hasParent (file, records) {
const dirname = path.dirname(file);
if (dirname === file) return false; // root directory
Expand Down Expand Up @@ -37,8 +39,6 @@ function purgeTopDirectories (records) {
}
}

const win32 = process.platform === 'win32';

function denominate (records, entrypoint, denominator) {
const newRecords = {};

Expand Down
5 changes: 5 additions & 0 deletions lib/walker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import globby from 'globby';
import natives from './natives.js';
import path from 'path';

const win32 = process.platform === 'win32';

function shortFromAlias (alias) {
// alias = fs-promise or @types/node
if (alias[0] === '@') {
Expand Down Expand Up @@ -68,6 +70,9 @@ function upon (p, base) {
negate = true;
}
p = path.join(base, p);
if (win32) {
p = p.replace(/\\/g, '/');
}
if (negate) {
p = '!' + p;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"into-stream": "^5.1.1",
"minimist": "^1.2.0",
"multistream": "^2.1.1",
"pkg-fetch": "^2.6.3",
"pkg-fetch": "^2.6.4",
"progress": "^2.0.3",
"resolve": "1.6.0",
"stream-meter": "^1.0.4"
Expand Down
2 changes: 2 additions & 0 deletions test/test-50-bakery-4/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const target = process.argv[2] || 'host';
const input = './test-x-index.js';
const output = './run-time/test-output.exe';

if (/^(node|v)?8/.test(target)) return;

let left;
utils.mkdirp.sync(path.dirname(output));

Expand Down
18 changes: 12 additions & 6 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,23 @@ if (process.env.CI) {
}
}

function joinAndForward (d) {
let r = path.join(__dirname, d);
if (process.platform === 'win32') r = r.replace(/\\/g, '/');
return r;
}

const list = [];

if (flavor === 'only-npm') {
list.push(path.join(__dirname, 'test-79-npm/main.js'));
list.push(joinAndForward('test-79-npm/main.js'));
} else {
list.push(path.join(__dirname, '*/main.js'));
list.push(joinAndForward('*/main.js'));
if (flavor === 'no-npm') {
list.push('!' + path.join(__dirname, 'test-42-fetch-all'));
list.push('!' + path.join(__dirname, 'test-46-multi-arch'));
list.push('!' + path.join(__dirname, 'test-46-multi-arch-2'));
list.push('!' + path.join(__dirname, 'test-79-npm'));
list.push('!' + joinAndForward('test-42-fetch-all'));
list.push('!' + joinAndForward('test-46-multi-arch'));
list.push('!' + joinAndForward('test-46-multi-arch-2'));
list.push('!' + joinAndForward('test-79-npm'));
}
}

Expand Down
71 changes: 25 additions & 46 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -661,13 +661,6 @@
dependencies:
regenerator-runtime "^0.13.2"

"@babel/runtime@~7.4.4":
version "7.4.5"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.5.tgz#582bb531f5f9dc67d2fcb682979894f75e253f12"
integrity sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==
dependencies:
regenerator-runtime "^0.13.2"

"@babel/template@^7.7.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b"
Expand Down Expand Up @@ -1012,7 +1005,7 @@ buffer-from@^1.0.0:
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==

byline@~5.0.0:
byline@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1"
integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=
Expand Down Expand Up @@ -1047,7 +1040,7 @@ caseless@~0.12.0:
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=

chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2, chalk@~2.4.1:
chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
Expand Down Expand Up @@ -1485,7 +1478,7 @@ expand-brackets@^2.1.4:
snapdragon "^0.8.1"
to-regex "^3.0.1"

expand-template@~2.0.3:
expand-template@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c"
integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==
Expand Down Expand Up @@ -1680,15 +1673,6 @@ fs-extra@^8.1.0:
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-extra@~7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
dependencies:
graceful-fs "^4.1.2"
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-minipass@^1.2.5:
version "1.2.7"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7"
Expand Down Expand Up @@ -1803,7 +1787,7 @@ globby@^10.0.1:
merge2 "^1.2.3"
slash "^3.0.0"

graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0:
graceful-fs@^4.1.11, graceful-fs@^4.1.6, graceful-fs@^4.2.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
Expand Down Expand Up @@ -2359,7 +2343,7 @@ minimist@0.0.8:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=

minimist@^1.2.0, minimist@~1.2.0:
minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
Expand Down Expand Up @@ -2721,22 +2705,22 @@ pkg-dir@^3.0.0:
dependencies:
find-up "^3.0.0"

pkg-fetch@^2.6.3:
version "2.6.3"
resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-2.6.3.tgz#6ff927e4b331f868e225a997e91008ec5a524565"
integrity sha512-EhRczQrjcfdtEH3D7ivGte7IJMkG4NHb515yr6pBZXAFpk0Fb1ypBBPJiEwgOaJ7kaVqhLlhQPeCn6CQ2mRddg==
dependencies:
"@babel/runtime" "~7.4.4"
byline "~5.0.0"
chalk "~2.4.1"
expand-template "~2.0.3"
fs-extra "~7.0.1"
minimist "~1.2.0"
progress "~2.0.0"
request "~2.88.0"
request-progress "~3.0.0"
semver "~6.0.0"
unique-temp-dir "~1.0.0"
pkg-fetch@^2.6.4:
version "2.6.4"
resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-2.6.4.tgz#0faac4c4ae9668e1daf9819180606966a5e33f96"
integrity sha512-4j4jiuo6RRIuD9e9xUE6OQYnIkQCArZjkHXNYsSJjxhJeiHE16MA+rENMblvGLbeWsTY3BPfcYVCGFXzpfJetA==
dependencies:
"@babel/runtime" "^7.7.5"
byline "^5.0.0"
chalk "^3.0.0"
expand-template "^2.0.3"
fs-extra "^8.1.0"
minimist "^1.2.0"
progress "^2.0.3"
request "^2.88.0"
request-progress "^3.0.0"
semver "^6.3.0"
unique-temp-dir "^1.0.0"

posix-character-classes@^0.1.0:
version "0.1.1"
Expand All @@ -2758,7 +2742,7 @@ process-nextick-args@~2.0.0:
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==

progress@^2.0.0, progress@^2.0.3, progress@~2.0.0:
progress@^2.0.0, progress@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
Expand Down Expand Up @@ -2891,14 +2875,14 @@ repeat-string@^1.6.1:
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=

request-progress@~3.0.0:
request-progress@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe"
integrity sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4=
dependencies:
throttleit "^1.0.0"

request@~2.88.0:
request@^2.88.0:
version "2.88.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==
Expand Down Expand Up @@ -3043,11 +3027,6 @@ semver@^6.1.2, semver@^6.3.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

semver@~6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65"
integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==

set-blocking@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
Expand Down Expand Up @@ -3456,7 +3435,7 @@ union-value@^1.0.0:
is-extendable "^0.1.1"
set-value "^2.0.1"

unique-temp-dir@~1.0.0:
unique-temp-dir@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz#6dce95b2681ca003eebfb304a415f9cbabcc5385"
integrity sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=
Expand Down

0 comments on commit 718d974

Please sign in to comment.