Skip to content

Commit

Permalink
feat(dependencies): define dependencies using new format
Browse files Browse the repository at this point in the history
BREAKING CHANGE: dependencies are now defined under dependencies.javascript
  • Loading branch information
travi committed Jan 25, 2025
1 parent b407766 commit 76eaac8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/scaffolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default async function ({projectRoot, dialect}) {
]);

return {
devDependencies: ['vitest', 'jest-when'],
dependencies: {javascript: {development: ['vitest', 'jest-when']}},
scripts: {'test:unit:base': 'DEBUG=any vitest run'},
testFilenamePattern: 'src/**/*.test.js'
};
Expand Down
4 changes: 2 additions & 2 deletions src/scaffolder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('scaffolder', () => {

it('that core details are defined', async () => {
const dialect = any.word();
const {devDependencies, scripts, testFilenamePattern} = await scaffold({projectRoot, dialect});
const {dependencies, scripts, testFilenamePattern} = await scaffold({projectRoot, dialect});

expect(fs.copyFile).toBeCalledWith(
path.resolve(__dirname, '..', 'templates', 'canary-test.js'),
Expand All @@ -33,7 +33,7 @@ describe('scaffolder', () => {
expect(scaffoldConfig).toBeCalledWith({projectRoot, dialect});

assert.deepEqual(scripts, {'test:unit:base': 'DEBUG=any vitest run'});
assert.deepEqual(devDependencies, ['vitest', 'jest-when']);
assert.deepEqual(dependencies.javascript.development, ['vitest', 'jest-when']);
assert.equal(testFilenamePattern, 'src/**/*.test.js');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Then} from '@cucumber/cucumber';
import {assert} from 'chai';

Then('dependencies are listed', async function () {
const {devDependencies} = this.result;
const {dependencies} = this.result;

assert.deepEqual(devDependencies, ['vitest', 'jest-when']);
assert.deepEqual(dependencies.javascript.development, ['vitest', 'jest-when']);
});

0 comments on commit 76eaac8

Please sign in to comment.