Skip to content
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
6 changes: 4 additions & 2 deletions commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
const VersionChecker = require('ember-cli-version-checker');

const fs = require('fs');
const mkdirp = require('mkdirp');
const path = require('path');
const { styleText } = require('node:util');
const strip = require('../utils').strip;
const getConfigPath = require('../utils').getConfigPath;
const { mkdirSync } = require('node:fs');

const FEATURES = require('../features');

Expand Down Expand Up @@ -48,7 +48,9 @@ const SHARED = {
}
}

mkdirp.sync(path.join(this.project.root, path.dirname(configPath)));
mkdirSync(path.join(this.project.root, path.dirname(configPath)), {
recursive: true,
});

fs.writeFileSync(configPath, '{}', { encoding: 'UTF-8' });

Expand Down
4 changes: 2 additions & 2 deletions features/template-only-glimmer-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const { styleText } = require('node:util');
const fs = require('fs');
const globSync = require('glob').globSync;
const mkdirp = require('mkdirp');
const { mkdirSync } = require('node:fs');
const p = require('util').promisify;
const path = require('path');
const strip = require('../utils').strip;
Expand Down Expand Up @@ -208,7 +208,7 @@ module.exports = {
let componentPath = components[i];
console.log(` ${styleText('green', 'create')} ${componentPath}`);
let absolutePath = path.join(project.root, componentPath);
await mkdirp(path.dirname(absolutePath));
await mkdirSync(path.dirname(absolutePath), { recursive: true });
await p(fs.writeFile)(absolutePath, ComponentFile, {
encoding: 'UTF-8',
});
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"ember-cli-version-checker": "^5.1.2",
"glob": "^13.0.1",
"inquirer": "^13.2.2",
"mkdirp": "^1.0.4",
"silent-error": "^1.1.1"
},
"devDependencies": {
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

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

6 changes: 3 additions & 3 deletions tests/commands-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const CWD = process.cwd();
const fs = require('fs');
const createTempDir = require('broccoli-test-helper').createTempDir;
const execa = require('execa');
const mkdirp = require('mkdirp');
const { mkdirSync } = require('node:fs');
const p = require('path').join;
const strip = require('../utils').strip;
const { stripVTControlCharacters: stripAnsi } = require('node:util');
Expand Down Expand Up @@ -45,11 +45,11 @@ QUnit.module('commands', (hooks) => {

process.chdir(project.path());

mkdirp.sync(p(CWD, 'node_modules', '@ember'));
mkdirSync(p(CWD, 'node_modules', '@ember'), { recursive: true });
fs.symlinkSync(p(CWD, 'node_modules'), p(project.path(), 'node_modules'));
fs.symlinkSync(CWD, p(CWD, 'node_modules', '@ember', 'optional-features'));

mkdirp.sync(p(CWD, 'node_modules', 'ember-source'));
mkdirSync(p(CWD, 'node_modules', 'ember-source'), { recursive: true });
fs.writeFileSync(
p(CWD, 'node_modules', 'ember-source', 'package.json'),
strip`
Expand Down