diff --git a/generators/app/index.js b/generators/app/index.js index b334452..6afbc4f 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -412,7 +412,7 @@ export default class extends Generator { type: 'input', name: 'nodeEngineVersion', message: 'Which Node engine version this project supports?', - default: 12.22 + default: 18 }, { type: 'input', diff --git a/generators/app/templates/_package.json b/generators/app/templates/_package.json index a0790fa..e5b3dd7 100644 --- a/generators/app/templates/_package.json +++ b/generators/app/templates/_package.json @@ -89,7 +89,7 @@ "karma-fixture": "^0.2.6",<% } %> "karma-mocha": "^2.0.1", "karma-mocha-reporter": "^2.2.5"<% } %><% if ( automatedTests || integrationTests ) { %>, - "mocha": "<% if (browserSupport.ie < 11) { %>^4.1.0<% } else { %><% if ( nodeEngineVersion >= 12 ) { %>^9.1.3<% } else { %>^8.2.0<% } %><% } %>"<% } %><% if ( automatedTests && codeCoverage && !browserModule ) { %>, + "mocha": "<% if (browserSupport.ie < 11) { %>^4.1.0<% } else { %>^10.3.0<% } %>"<% } %><% if ( automatedTests && codeCoverage && !browserModule ) { %>, "nodemon": "^2.0.6", "nyc": "^15.1.0"<% } %><% if ( automatedTests && codeCoverage && browserModule && !sassModule ) { %><% if ( bundlingTool === 'webpack' ) { %>, "@jsdevtools/coverage-istanbul-loader": "^3.0.5"<% } %><% if ( bundlingTool === 'rollup' ) { %>, @@ -152,7 +152,7 @@ "ts-node": "^10.1.0",<% } %><% if ( browserModule && usesHtmlFixtures ) { %> "@types/karma-fixture": "^0.2.5",<% } %> "@types/node": "^16.3.0"<% if ( automatedTests || integrationTests ) { %>, - "@types/mocha": "<% if ( nodeEngineVersion >= 12 ) { %>^9.0.0<% } else { %>^8.2.3<% } %>"<% } %><% } %> + "@types/mocha": "^10.0.6"<% } %><% } %> },<% if ( isScopedPackage ) { %> "publishConfig": { "access": "public" diff --git a/generators/app/templates/eslintrc b/generators/app/templates/eslintrc index 6f3c1d3..c808714 100644 --- a/generators/app/templates/eslintrc +++ b/generators/app/templates/eslintrc @@ -23,7 +23,7 @@ files.push("rollup.config.js"); } %>{ "settings": { "html/html-extensions": [".svelte"], "html/indent": "0" - }<% } %><% if ( browserModule || files.length !== 0 || nodeEngineVersion <= 10 ) { %>, + }<% } %><% if ( browserModule || files.length !== 0 ) { %>, "overrides": [ { <% if ( files.length !== 0 ) { %>"files": [<% for ( var i = 0, filesLength = files.length; i < filesLength; i++ ) { %> @@ -35,11 +35,9 @@ files.push("rollup.config.js"); } %>{ }<% } %>, "parserOptions": { "sourceType": "script" - }<% if ( nodeEngineVersion <= 10 ) { %>, - "plugins": ["eslint-plugin-unicorn"]<% } %>, + }, "rules": { - "no-console": 0<% if ( nodeEngineVersion <= 10 ) { %>, - "unicorn/numeric-separators-style": 0<% } %> + "no-console": 0 } } ]<% } %> diff --git a/test/index.js b/test/index.js index 55b2cf6..19fa17c 100644 --- a/test/index.js +++ b/test/index.js @@ -197,7 +197,7 @@ describe('Automated tests', function () { 'test:watch': 'npm test -- --watch' }, devDependencies: { - mocha: '^9.1.3' + mocha: '^10.3.0' } }); }); @@ -357,7 +357,7 @@ describe('Integration tests', function () { { modules: false, targets: { - node: '12.22' + node: '18' } } ] @@ -899,7 +899,7 @@ describe('Transpile', function () { { modules: false, targets: { - node: '12.22' + node: '18' } } ] @@ -1490,7 +1490,7 @@ describe('TypeScript, with comments', function () { devDependencies: { 'typescript': '^4.3.5', '@types/node': '^16.3.0', - '@types/mocha': '^9.0.0' + '@types/mocha': '^10.0.6' } }); }); @@ -1509,25 +1509,7 @@ describe('TypeScript, full', function () { .toPromise(); }); - it('should create necessary files', function () { - assert.file(['tsconfig.json']); - }); - it('should fill rollup.config.js with correct information', function () { assert.fileContent('rollup.config.js', "input: 'index.ts'"); }); - - it('should fill package.json with correct information', function () { - assert.jsonFileContent('package.json', { - types: 'esm/index.d.ts', - scripts: { - 'lint:types': 'tsc' - }, - devDependencies: { - 'typescript': '^4.3.5', - '@types/node': '^16.3.0', - '@types/mocha': '^9.0.0' - } - }); - }); });