Skip to content

Commit 0a8c355

Browse files
authored
Merge pull request #352 from emberjs/bugfix-npm-security-audit
update inquirer and glob (to clear audit warnings) and drop support for node < 20.19
2 parents 5438e3e + 0182f34 commit 0a8c355

5 files changed

Lines changed: 6602 additions & 4698 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
17+
node-version: [20.x, 22.x, 24.x]
1818

1919
steps:
2020
- uses: actions/checkout@v4
2121
- uses: actions/setup-node@v4
2222
with:
2323
node-version: ${{ matrix.node-version }}
2424
cache: npm
25-
- run: npm i -g npm@7
26-
if: ${{ matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' }}
2725
- run: npm ci
2826
- run: npm run lint:js
2927
- run: npm test

features/application-template-wrapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ module.exports = {
7272
7373
To be very conservative, I could add the \`<div class="ember-view">\` wrapper to your application.hbs. (You can always remove it later.)
7474
`);
75-
76-
let response = await require('inquirer').prompt({
75+
const prompt = require('inquirer').createPromptModule();
76+
let response = await prompt({
7777
type: 'confirm',
7878
name: 'shouldRewrite',
7979
message: 'Would you like me to do that for you?',

features/template-only-glimmer-components.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
const chalk = require('chalk');
55
const fs = require('fs');
6-
const glob = require('glob');
6+
const globSync = require('glob').globSync;
77
const mkdirp = require('mkdirp');
88
const p = require('util').promisify;
99
const path = require('path');
@@ -65,7 +65,7 @@ module.exports = {
6565

6666
// Handle "Classic" layout
6767
let templatesRoot = path.join(root, 'app/templates/components');
68-
let templateCandidates = await p(glob)('**/*.hbs', { cwd: templatesRoot });
68+
let templateCandidates = globSync('**/*.hbs', { cwd: templatesRoot });
6969

7070
templateCandidates.forEach((template) => {
7171
let templatePath = path.join('app/templates/components', template);
@@ -89,7 +89,7 @@ module.exports = {
8989
// Handle "Pods" layout without prefix
9090

9191
let componentsRoot = path.join(root, 'app/components');
92-
templateCandidates = await p(glob)('**/template.hbs', {
92+
templateCandidates = globSync('**/template.hbs', {
9393
cwd: componentsRoot,
9494
});
9595

@@ -115,7 +115,7 @@ module.exports = {
115115
// Handle "Pods" layout *with* prefix
116116

117117
componentsRoot = path.join(root, `app/${podsFolder}/components`);
118-
templateCandidates = await p(glob)('**/template.hbs', {
118+
templateCandidates = globSync('**/template.hbs', {
119119
cwd: componentsRoot,
120120
});
121121

@@ -179,8 +179,8 @@ module.exports = {
179179
)}
180180
`);
181181
}
182-
183-
let response = await require('inquirer').prompt({
182+
const prompt = require('inquirer').createPromptModule();
183+
let response = await prompt({
184184
type: 'confirm',
185185
name: 'shouldGenerate',
186186
message: 'Would you like me to generate these component files for you?',

0 commit comments

Comments
 (0)