Skip to content

Commit

Permalink
fix(feature detection): adds feature detections for newer features su…
Browse files Browse the repository at this point in the history
…ch as Intl.ListFormat, String.prototype.matchAll, and Constructable Stylesheets/DocumentOrShadowRoot.adoptedStyleSheets
  • Loading branch information
wessberg committed Mar 12, 2019
1 parent c3fc822 commit c14c118
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"prettier": "^1.16.4",
"pretty-quick": "^1.10.0",
"standard-changelog": "^2.0.7",
"ts-node": "^8.0.2",
"ts-node": "^8.0.3",
"tslint": "^5.13.1",
"typescript": "^3.3.3333",
"useragent-generator": "^1.1.0"
Expand All @@ -65,33 +65,33 @@
"@types/iltorb": "^2.3.0",
"@types/memory-fs": "^0.3.2",
"@types/mime": "^2.0.1",
"@types/node": "^11.9.6",
"@types/node": "^11.11.2",
"@types/semver": "^5.5.0",
"@webcomponents/custom-elements": "^1.2.1",
"@webcomponents/shadycss": "^1.9.0",
"@webcomponents/shadydom": "^1.5.0",
"@webcomponents/template": "^1.4.0",
"@wessberg/browserslist-generator": "1.0.12",
"@wessberg/browserslist-generator": "1.0.13",
"@wessberg/di": "^2.0.3",
"@wessberg/fileloader": "^1.1.9",
"@wessberg/filesaver": "^1.0.8",
"@wessberg/pointer-events": "^1.0.9",
"@wessberg/stringutil": "^1.0.18",
"Base64": "^1.0.2",
"astring": "^1.3.1",
"ava": "^1.2.1",
"ava": "^1.3.1",
"blob-polyfill": "^3.0.20180112",
"chalk": "^2.4.2",
"console-polyfill": "^0.3.0",
"construct-style-sheets-polyfill": "^1.0.1",
"core-js": "^3.0.0-beta.16",
"core-js-builder": "^3.0.0-beta.16",
"core-js": "^3.0.0-beta.18",
"core-js-builder": "^3.0.0-beta.18",
"devcert": "^1.0.0",
"events-polyfill": "^2.1.0",
"file-type": "^10.8.0",
"file-type": "^10.9.0",
"find-up": "^3.0.0",
"http-status-codes": "^1.3.0",
"iltorb": "^2.4.1",
"http-status-codes": "^1.3.1",
"iltorb": "^2.4.2",
"intersection-observer": "^0.5.1",
"intl": "^1.2.5",
"intl-list-format": "^1.0.2",
Expand All @@ -109,18 +109,18 @@
"requestanimationframe": "0.0.23",
"requestidlecallback": "^0.3.0",
"resize-observer": "^1.0.0",
"rollup": "^1.4.0",
"rollup": "^1.6.0",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-multi-entry": "^2.1.0",
"rollup-plugin-node-resolve": "^4.0.1",
"scroll-behavior-polyfill": "^2.0.7",
"semver": "^5.6.0",
"setimmediate": "^1.0.5",
"systemjs": "^3.0.0",
"systemjs": "^3.0.1",
"temp-dir": "^1.0.0",
"toposort": "^2.0.2",
"tslib": "^1.9.3",
"url-polyfill": "^1.1.3",
"url-polyfill": "^1.1.5",
"web-animations-js": "^2.3.1",
"whatwg-fetch": "^3.0.0",
"xhr-polyfill": "^0.1.8",
Expand Down
12 changes: 3 additions & 9 deletions src/constant/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const constant: IConstant = {
contexts: ALL_CONTEXTS
},
zone: {
// TODO: When the context is 'node', load dist/zone-node.js instead
library: "zone.js",
meta: {
error: "dist/zone-error.min.js"
Expand Down Expand Up @@ -788,8 +787,7 @@ export const constant: IConstant = {
"es.string.match-all": {
library: "core-js",
relativePaths: ["modules/esnext.string.match-all.js"],
// TODO: Update when MDN or Caniuse Compatibility is added
features: [],
features: ["javascript.builtins.String.matchAll"],
version: environment.NPM_PACKAGE_DEPENDENCIES_CORE_JS,
dependencies: [],
contexts: ALL_CONTEXTS
Expand Down Expand Up @@ -2726,10 +2724,7 @@ export const constant: IConstant = {
meta: {
localeDir: "locale-data"
},
features: [
// TODO: Add when MDN data gets updated
// "javascript.builtins.Intl.ListFormat"
],
features: ["javascript.builtins.Intl.ListFormat"],
version: environment.NPM_PACKAGE_DEPENDENCIES_INTL_LIST_FORMAT,
dependencies: ["intl.core", "es.array.includes", "es.object.create", "es.string.replace", "es.symbol.to-string-tag", "es.weak-map"],
contexts: ALL_CONTEXTS
Expand Down Expand Up @@ -2983,8 +2978,7 @@ export const constant: IConstant = {
"constructable-style-sheets": {
library: "construct-style-sheets-polyfill",
relativePaths: ["adoptedStyleSheets.min.js"],
// TODO: Add features when MDN or Caniuse adds support
features: [],
features: ["api.DocumentOrShadowRoot.adoptedStyleSheets"],
version: environment.NPM_PACKAGE_DEPENDENCIES_CONSTRUCT_STYLE_SHEETS_POLYFILL,
dependencies: ["shadow-dom"],
contexts: ALL_CONTEXTS
Expand Down

0 comments on commit c14c118

Please sign in to comment.