Skip to content

Commit

Permalink
Remove IE support
Browse files Browse the repository at this point in the history
  • Loading branch information
niksy committed Mar 23, 2024
1 parent 5a286ea commit 689aa04
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 47 deletions.
26 changes: 4 additions & 22 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -156,9 +147,6 @@ function getMinimumSupportedBrowserVersions(browserVersion) {
}
);
browserSupport = fromEntries(browserSupport);
if ('ie' in browserSupport) {
delete browserSupport.edge;
}
return browserSupport;
}

Expand Down Expand Up @@ -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;
},
Expand All @@ -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,
Expand Down
7 changes: 2 additions & 5 deletions generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) { %>,
Expand Down Expand Up @@ -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) ) { %>,
Expand Down
7 changes: 1 addition & 6 deletions generators/app/templates/babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
18 changes: 4 additions & 14 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,20 +482,20 @@ describe('Browser module, browser version', function () {
.run(generatorPath)
.withAnswers({
browserModule: true,
browserVersion: 'ie >= 11'
browserVersion: 'edge >= 100'
})
.toPromise();
});

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');
});
});

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 689aa04

Please sign in to comment.