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: drop quibble dependency #560

Merged
merged 1 commit into from
Oct 15, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions package-lock.json

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

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,23 @@
"which-package-manager": "^0.0.1"
},
"devDependencies": {
"@yeoman/eslint": "0.2.0",
"@types/debug": "^4.1.9",
"@types/lodash-es": "^4.17.9",
"@types/semver": "^7.5.3",
"@yeoman/eslint": "0.2.0",
"c8": "^10.1.2",
"cpy-cli": "^5.0.0",
"esmocha": "^2.0.0",
"eslint": "9.12.0",
"esmocha": "^2.1.0",
"fs-extra": "^11.1.1",
"jsdoc": "^4.0.2",
"prettier": "3.0.3",
"prettier-plugin-packagejson": "^2.4.6",
"quibble": "^0.9.1",
"rimraf": "^5.0.5",
"sinon": "^19.0.2",
"sinon-test": "^3.1.5",
"strip-ansi": "^7.1.0",
"typescript": "5.2.2",
"eslint": "9.12.0",
"yeoman-assert": "^3.1.1",
"yeoman-environment": "file:./",
"yeoman-generator-2": "npm:yeoman-generator@^2.0.5",
Expand Down
18 changes: 4 additions & 14 deletions test/generator-features.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
import assert from 'node:assert';
import { Module } from 'node:module';
import sinon from 'sinon';
import { after, afterEach, before, beforeEach, describe, esmocha, expect, it } from 'esmocha';
import quibble from 'quibble';
import helpers, { getCreateEnv as getCreateEnvironment } from './helpers.js';
import { greaterThan5 } from './generator-versions.js';
import * as execaModule from 'execa';

if (!Module.register) {
throw new Error('Node greater than v18.19.0 or v20.6.0 is required to test this module.');
}

const commitSharedFsTask = esmocha.fn();
const packageManagerInstallTask = esmocha.fn();
const execa = esmocha.fn();
await quibble.esm('../src/commit.ts', { commitSharedFsTask });
await quibble.esm('../src/package-manager.ts', { packageManagerInstallTask });
await quibble.esm('execa', { ...execaModule, execa });
const { commitSharedFsTask } = await esmocha.mock('../src/commit.js', import('../src/commit.js'));
const { packageManagerInstallTask } = await esmocha.mock('../src/package-manager.js', import('../src/package-manager.js'));
const { execa } = await esmocha.mock('execa', import('execa'));
const { default: BasicEnvironment } = await import('../src/environment-base.js');

for (const generatorVersion of greaterThan5) {
Expand All @@ -28,7 +18,7 @@ for (const generatorVersion of greaterThan5) {
esmocha.resetAllMocks();
});
after(() => {
quibble.reset();
esmocha.reset(true);
});

describe('customCommitTask feature', () => {
Expand Down
14 changes: 3 additions & 11 deletions test/package-manager.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
import { Module } from 'node:module';
import path, { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import sinon from 'sinon';
import { after, afterEach, beforeEach, describe, esmocha, expect, it } from 'esmocha';
import quibble from 'quibble';

if (!Module.register) {
throw new Error('Node greater than v18.19.0 or v20.6.0 is required to test this module.');
}

const execa = esmocha.fn();
await quibble.esm('execa', { execa });
const whichPackageManager = esmocha.fn();
await quibble.esm('which-package-manager', { whichPackageManager });
const { execa } = await esmocha.mock('execa', import('execa'));
const { whichPackageManager } = await esmocha.mock('which-package-manager', import('which-package-manager'));

const { packageManagerInstallTask } = await import('../src/package-manager.js');

Expand Down Expand Up @@ -43,7 +35,7 @@ describe('environment (package-manager)', () => {
esmocha.resetAllMocks();
});
after(() => {
quibble.reset();
esmocha.reset();
});

describe('#packageManagerInstallTask()', () => {
Expand Down
Loading