diff --git a/generators/app/index.js b/generators/app/index.js index 6afbc4f..0818535 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -36,15 +36,6 @@ const browserIdMapping = { 'os_version': '7' } }, - ie: { - shortName: 'IE', - longName: 'Internet Explorer', - versionKey: 'browser_version', - serviceProps: { - os: 'Windows', - 'os_version': '7' - } - }, edge: { shortName: 'Edge', longName: 'Edge', @@ -156,9 +147,6 @@ function getMinimumSupportedBrowserVersions(browserVersion) { } ); browserSupport = fromEntries(browserSupport); - if ('ie' in browserSupport) { - delete browserSupport.edge; - } return browserSupport; } @@ -433,9 +421,7 @@ export default class extends Generator { ); const defaultValues = Object.keys(browserSupport).filter( (browserId) => - ['chrome', 'firefox', 'ie', 'edge'].includes( - browserId - ) + ['chrome', 'firefox', 'edge'].includes(browserId) ); return defaultValues; }, @@ -445,13 +431,9 @@ export default class extends Generator { ); const choices = Object.keys(browserSupport) .filter((browserId) => - [ - 'chrome', - 'firefox', - 'ie', - 'edge', - 'ios_saf' - ].includes(browserId) + ['chrome', 'firefox', 'edge', 'ios_saf'].includes( + browserId + ) ) .map((browserId) => [ browserIdMapping[browserId].longName, diff --git a/generators/app/templates/_package.json b/generators/app/templates/_package.json index e5b3dd7..345751e 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 { %>^10.3.0<% } %>"<% } %><% if ( automatedTests && codeCoverage && !browserModule ) { %>, + "mocha": "^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' ) { %>, @@ -127,10 +127,7 @@ "@babel/core": "^7.2.2", "core-js": "^2.6.5", "@babel/preset-env": "^7.12.1"<% if ( typescript && typescriptMode === 'full' ) { %>, - "@babel/preset-typescript": "^7.14.5"<% } %><% if ( browserModule && browserSupport.ie <= 11 ) { %>, - "@babel/plugin-transform-member-expression-literals": "^7.12.1", - "@babel/plugin-transform-property-literals": "^7.12.1", - "@babel/plugin-transform-object-assign": "^7.2.0"<% } %><% if ( browserModule && !sassModule ) { %><% if ( bundlingTool === 'webpack' ) { %>, + "@babel/preset-typescript": "^7.14.5"<% } %><% if ( browserModule && !sassModule ) { %><% if ( bundlingTool === 'webpack' ) { %>, "babel-loader": "^8.1.0"<% } %><% } %><% if ( (automatedTests || manualTests) && browserModule && !sassModule ) { %>, "@babel/plugin-transform-runtime": "^7.2.0", "@babel/runtime": "^7.2.0"<% } %><% if ( automatedTests ) { %><% if ( !browserModule || (browserModule && integrationTests) ) { %>, diff --git a/generators/app/templates/babelrc b/generators/app/templates/babelrc index b556ff6..ec89dfd 100644 --- a/generators/app/templates/babelrc +++ b/generators/app/templates/babelrc @@ -8,12 +8,7 @@ } }]<% } %><% if ( typescript && typescriptMode === 'full' ) { %>, "@babel/preset-typescript"<% } %> - ]<% if ( browserModule && browserSupport.ie <= 11 ) { %>, - "plugins": [ - "@babel/plugin-transform-member-expression-literals", - "@babel/plugin-transform-property-literals", - "@babel/plugin-transform-object-assign" - ]<% } %><% if ( automatedTests && codeCoverage && !browserModule ) { %>, + ]<% if ( automatedTests && codeCoverage && !browserModule ) { %>, "env": { "test": { "plugins": [ diff --git a/test/index.js b/test/index.js index 19fa17c..c985c27 100644 --- a/test/index.js +++ b/test/index.js @@ -482,7 +482,7 @@ describe('Browser module, browser version', function () { .run(generatorPath) .withAnswers({ browserModule: true, - browserVersion: 'ie >= 11' + browserVersion: 'edge >= 100' }) .toPromise(); }); @@ -490,12 +490,12 @@ describe('Browser module, browser version', function () { it('should add information regarding browser support to README.md', function () { assert.fileContent( 'README.md', - 'Tested in Internet Explorer 11 and should work in all modern browsers ([support based on Browserslist configuration](https://browserslist.dev/?q=aWUgPj0gMTE%3D)).' + 'Tested in Edge 100 and should work in all modern browsers ([support based on Browserslist configuration](https://browserslist.dev/?q=ZWRnZSA%2BPSAxMDA%3D)).' ); }); it('should fill .browserslistrc with correct information', function () { - assert.fileContent('.browserslistrc', 'ie >= 11'); + assert.fileContent('.browserslistrc', 'edge >= 100'); }); }); @@ -991,21 +991,11 @@ describe('Transpile, browser module, with automated tests and code coverage', fu codeCoverage: true, browserModule: true, transpile: true, - browserVersion: 'ie >= 11' + browserVersion: 'edge >= 100' }) .toPromise(); }); - it('should fill .babelrc with correct information', function () { - assert.jsonFileContent('.babelrc', { - plugins: [ - '@babel/plugin-transform-member-expression-literals', - '@babel/plugin-transform-property-literals', - '@babel/plugin-transform-object-assign' - ] - }); - }); - it('should add proper data to karma.conf.js', function () { assert.fileContent('karma.conf.js', 'babel-loader'); assert.fileContent(