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

chore!: Normalize repository, dropping node <10.13 support #239

Merged
merged 35 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3bd501d
chore: Normalize repository, dropping node <10.13 support
sttk Nov 13, 2022
c1b50cf
test: stop using gulp-test-tool
sttk Nov 17, 2022
4868529
update: replace ansi-colors and color-support to chalk
sttk Nov 20, 2022
da59456
update: remove array-sort from dependencies
sttk Nov 20, 2022
3a03cff
update: remove isobject from dependencies
sttk Nov 20, 2022
9db1f81
update: upgrade yargs to 16.2.0
sttk Nov 26, 2022
4b75988
update: upgrade liftoff to 4.0.0
sttk Nov 26, 2022
76d0581
doc: modify README.md
sttk Nov 26, 2022
40b487e
update: modify for coverage
sttk Sep 10, 2023
52e568a
fix: suppress error on CI
sttk Sep 10, 2023
6170167
test: upgrade expect to 27.5.1
sttk Nov 27, 2022
5e80a3f
chore: upgrade marked-man to 0.7.0
sttk Sep 10, 2023
8afc851
fix: modify Liftoff.configFiles and change normalize-config to merge-…
sttk Sep 10, 2023
f3fa77c
Update LICENSE
sttk Sep 10, 2023
fa088eb
Update README.md
sttk Sep 10, 2023
225beb0
chore: modify ci badge url in README.md
sttk Sep 10, 2023
002d0fa
Update LICENSE
sttk Oct 7, 2023
18d348b
Update package.json
sttk Oct 7, 2023
95f93c2
Update test/config-flags-preload.js
sttk Oct 7, 2023
f46d7cd
fix: remove dependency on concat-stream and change getting blacklist
sttk Oct 7, 2023
1f93514
fix: modify that project config overrides userHome config
sttk Oct 7, 2023
bb25f48
fix: modify mistakes of descriptions in test fixtures and expected
sttk Oct 7, 2023
4ce1c2a
fix: remove `if` conditions for mjs-stub in preload:before and preloa…
sttk Oct 7, 2023
7414f32
fix: change gulp execution by using helper function
sttk Oct 8, 2023
64e381b
fix: change expect.stringContaining to use toMatch in test/sync-taks.js
sttk Oct 8, 2023
7242a8e
fix: remove extra not.toMatch in test/flags-preload.js
sttk Oct 8, 2023
ccf2770
update: remove archy and remake logTasks
sttk Oct 15, 2023
1439453
update: remove pretty-hrtime
sttk Oct 29, 2023
0ac2821
update: remove matchdep and modify skip conditions of esm.js
sttk Nov 4, 2023
3319411
update: make env the sole object determining the behavior of gulp
sttk Nov 19, 2023
83c1603
Update lib/shared/log/tasks.js
sttk Dec 30, 2023
9b78b55
fix: modify sorting task flag entries
sttk Jan 6, 2024
ccb2652
update: remove cd in tool/gulp-cmd.js and use cwd option of exec instead
sttk Jan 6, 2024
ff6fad2
fix: modify test cases for flags.gulpfile config
sttk Jan 6, 2024
e66899b
update: remove micromatch
sttk Jan 6, 2024
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
13 changes: 10 additions & 3 deletions lib/shared/verify-dependencies.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var matchdep = require('matchdep');
var micromatch = require('micromatch');

/**
* Given a collection of plugin names verifies this collection against
Expand All @@ -12,8 +12,15 @@ var matchdep = require('matchdep');
* @param blacklist - contents of the blacklist in JSON format
*/
function verifyDependencies(pkg, blacklist) {
var blacklisted = matchdep
.filterAll(Object.keys(blacklist), pkg)
var pluginNames = [
'dependencies',
'devDependencies',
'peerDependencies',
].reduce(function(res, prop) {
return res.concat(Object.keys(pkg[prop] || {}));
}, []);

var blacklisted = micromatch(pluginNames, Object.keys(blacklist))
phated marked this conversation as resolved.
Show resolved Hide resolved
.reduce(function(blacklisted, pluginName) {
blacklisted[pluginName] = blacklist[pluginName];
return blacklisted;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"gulplog": "^2.0.1",
"interpret": "^3.1.1",
"liftoff": "^4.0.0",
"matchdep": "^2.0.0",
"micromatch": "^4.0.5",
phated marked this conversation as resolved.
Show resolved Hide resolved
"mute-stdout": "^2.0.0",
"replace-homedir": "^2.0.0",
"semver-greatest-satisfied-range": "^2.0.0",
Expand Down
26 changes: 23 additions & 3 deletions test/esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,34 @@ var exec = require('child_process').exec;
var fs = require('fs');
var path = require('path');
var semver = require('semver');
var os = require('os');

var baseDir = path.join(__dirname, '..');
var sliceLines = require('./tool/slice-lines');
var cd = require('./tool/gulp-cmd').cd;

var expectedDir = path.join(__dirname, 'expected');

function shouldSkip() {
switch (os.platform()) {
case 'win32': {
return semver.satisfies(process.version, '^11.2.0') ||
(process.env.CI && semver.satisfies(process.version, '10.x.x'));
}
case 'darwin': {
return semver.satisfies(process.version, '>=11.0.0 <11.11.0');
}
case 'linux': {
return semver.satisfies(process.version, '>=11.2.0 <11.4.0');
}
}
return semver.satisfies(process.version, '12.8.x || >=12.11.0 <12.18.0 || >=13.0.0 <13.8.0');
}

describe('ESM', function() {

it('prints the task list', function(done) {
// Segmentation fault is caused only v10.15.3.
if (semver.eq(process.version, '10.15.3')) {
if (shouldSkip()) {
this.skip();
}

Expand All @@ -31,7 +47,11 @@ describe('ESM', function() {

function cb(err, stdout, stderr) {
expect(err).toBeNull();
expect(stderr).toMatch(/^(.*ExperimentalWarning: The ESM module loader is experimental\.\n)?$/);
if (!semver.satisfies(process.version, '^12.20.0 || >=13.14.0')) {
expect(stderr).toMatch('ExperimentalWarning: The ESM module loader is experimental.\n');
} else {
expect(stderr).toEqual('');
}
var filepath = path.join(expectedDir, 'esm.txt');
var expected = fs.readFileSync(filepath, 'utf-8');
expect(sliceLines(stdout, trailingLines)).toEqual(expected);
Expand Down