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 broken main test #950

Merged
merged 4 commits into from Aug 26, 2022
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
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -20,10 +20,11 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [12.x, 14.x, 16.x]
webpack-version: [latest, '4']
include:
- node: 14.x
- node-version: 18.x
webpack-version: latest
os: ubuntu-latest
coverage: true
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -55,10 +56,10 @@ jobs:
YARN_NODE_LINKER: node-modules
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
- name: Use Node.js latest
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: '*'
- name: Install dependencies
run: yarn
- name: Install webpack 4
Expand Down
55 changes: 0 additions & 55 deletions .yarn/releases/yarn-2.3.3.cjs

This file was deleted.

783 changes: 783 additions & 0 deletions .yarn/releases/yarn-3.2.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
@@ -1 +1 @@
yarnPath: .yarn/releases/yarn-2.3.3.cjs
yarnPath: .yarn/releases/yarn-3.2.3.cjs
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -120,5 +120,8 @@
"node ./scripts/yarn-install.js",
"git add yarn.lock"
]
},
"resolutions": {
"nyc/node-preload": "0.2.0"
}
}
10 changes: 7 additions & 3 deletions test/cache.test.js
Expand Up @@ -27,6 +27,10 @@ const globalConfig = {
},
};

// Cache filename is either SHA256 or MD5 hash
const UNCOMPRESSED_CACHE_FILE_REGEX = /^[0-9a-f]{32}(?:[0-9a-f]{32})?\.json$/;
const CACHE_FILE_REGEX = /^[0-9a-f]{32}(?:[0-9a-f]{32})?\.json\.gz$/;

// Create a separate directory for each test so that the tests
// can run in parallel

Expand Down Expand Up @@ -109,7 +113,7 @@ test.serial.cb(
t.deepEqual(stats.compilation.warnings, []);

fs.readdir(defaultCacheDir, (err, files) => {
files = files.filter(file => /\b[0-9a-f]{5,40}\.json\.gz\b/.test(file));
files = files.filter(file => CACHE_FILE_REGEX.test(file));

t.is(err, null);
t.true(files.length > 0);
Expand Down Expand Up @@ -146,7 +150,7 @@ test.serial.cb(
t.is(err, null);

fs.readdir(defaultCacheDir, (err, files) => {
files = files.filter(file => /\b[0-9a-f]{5,40}\b/.test(file));
files = files.filter(file => UNCOMPRESSED_CACHE_FILE_REGEX.test(file));

t.is(err, null);
t.true(files.length > 0);
Expand Down Expand Up @@ -180,7 +184,7 @@ test.serial.cb(
t.deepEqual(stats.compilation.warnings, []);

fs.readdir(defaultCacheDir, (err, files) => {
files = files.filter(file => /\b[0-9a-f]{5,40}\.json\.gz\b/.test(file));
files = files.filter(file => CACHE_FILE_REGEX.test(file));

t.is(err, null);

Expand Down