Skip to content

Commit

Permalink
feat(polyfill): adds missing ESNext map methods: 'Map.#every, 'Map.#f…
Browse files Browse the repository at this point in the history
…ind', 'Map.#find-key', 'Map.#includes', 'Map.#key-of', 'Map.#reduce', Map.'#some', and 'Map.#update'
  • Loading branch information
wessberg committed Feb 7, 2019
1 parent 5266c25 commit 1307877
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 10 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
],
"devDependencies": {
"@wessberg/di-compiler": "^2.0.2",
"@wessberg/rollup-plugin-ts": "1.1.22",
"@wessberg/scaffold": "^1.0.8",
"@wessberg/ts-config": "^0.0.38",
"@wessberg/rollup-plugin-ts": "1.1.28",
"@wessberg/scaffold": "^1.0.13",
"@wessberg/ts-config": "^0.0.39",
"standard-changelog": "^2.0.6",
"tslint": "^5.12.1",
"typescript": "^3.3.1",
Expand All @@ -61,12 +61,12 @@
"@types/file-type": "^10.6.0",
"@types/iltorb": "^2.3.0",
"@types/memory-fs": "^0.3.2",
"@types/mime": "^2.0.0",
"@types/mime": "^2.0.1",
"@types/node": "^10.12.21",
"@types/semver": "^5.5.0",
"@webcomponents/custom-elements": "^1.2.1",
"@webcomponents/shadycss": "^1.9.0",
"@webcomponents/shadydom": "^1.4.3",
"@webcomponents/shadydom": "^1.5.0",
"@webcomponents/template": "^1.4.0",
"@wessberg/browserslist-generator": "1.0.9",
"@wessberg/di": "^2.0.3",
Expand All @@ -76,19 +76,19 @@
"@wessberg/stringutil": "^1.0.18",
"Base64": "^1.0.1",
"astring": "^1.3.1",
"ava": "^1.2.0",
"ava": "^1.2.1",
"blob-polyfill": "^3.0.20180112",
"chalk": "^2.4.2",
"console-polyfill": "^0.3.0",
"core-js": "^3.0.0-beta.13",
"core-js-builder": "^3.0.0-beta.13",
"core-js": "^3.0.0-beta.14",
"core-js-builder": "^3.0.0-beta.14",
"devcert": "^1.0.0",
"events-polyfill": "^2.1.0",
"file-type": "^10.7.1",
"http-status-codes": "^1.3.0",
"iltorb": "^2.4.1",
"intersection-observer": "^0.5.1",
"intl": "https://github.com/andyearnshaw/Intl.js",
"intl": "git+https://github.com/andyearnshaw/Intl.js.git",
"intl-list-format": "^1.0.0",
"intl-relative-time-format": "^1.0.4",
"memory-fs": "^0.4.1",
Expand Down
91 changes: 90 additions & 1 deletion src/constant/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,15 @@ export const constant: IConstant = {
dependencies: [],
contexts: ALL_CONTEXTS
},
"es.map.every": {
library: "core-js",
relativePaths: ["modules/esnext.map.every.js"],
// TODO: Update when MDN or Caniuse Compatibility is added
features: [],
version: environment.NPM_PACKAGE_DEPENDENCIES_CORE_JS,
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.filter": {
library: "core-js",
relativePaths: ["modules/esnext.map.filter.js"],
Expand All @@ -1665,6 +1674,24 @@ export const constant: IConstant = {
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.find": {
library: "core-js",
relativePaths: ["modules/esnext.map.find.js"],
// TODO: Update when MDN or Caniuse Compatibility is added
features: [],
version: environment.NPM_PACKAGE_DEPENDENCIES_CORE_JS,
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.find-key": {
library: "core-js",
relativePaths: ["modules/esnext.map.find-key.js"],
// TODO: Update when MDN or Caniuse Compatibility is added
features: [],
version: environment.NPM_PACKAGE_DEPENDENCIES_CORE_JS,
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.from": {
library: "core-js",
relativePaths: ["modules/esnext.map.from.js"],
Expand All @@ -1683,6 +1710,15 @@ export const constant: IConstant = {
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.includes": {
library: "core-js",
relativePaths: ["modules/esnext.map.includes.js"],
// TODO: Update when MDN or Caniuse Compatibility is added
features: [],
version: environment.NPM_PACKAGE_DEPENDENCIES_CORE_JS,
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.key-by": {
library: "core-js",
relativePaths: ["modules/esnext.map.key-by.js"],
Expand All @@ -1692,6 +1728,15 @@ export const constant: IConstant = {
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.key-of": {
library: "core-js",
relativePaths: ["modules/esnext.map.key-of.js"],
// TODO: Update when MDN or Caniuse Compatibility is added
features: [],
version: environment.NPM_PACKAGE_DEPENDENCIES_CORE_JS,
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.map-keys": {
library: "core-js",
relativePaths: ["modules/esnext.map.map-keys.js"],
Expand Down Expand Up @@ -1728,6 +1773,33 @@ export const constant: IConstant = {
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.reduce": {
library: "core-js",
relativePaths: ["modules/esnext.map.reduce.js"],
// TODO: Update when MDN or Caniuse Compatibility is added
features: [],
version: environment.NPM_PACKAGE_DEPENDENCIES_CORE_JS,
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.some": {
library: "core-js",
relativePaths: ["modules/esnext.map.some.js"],
// TODO: Update when MDN or Caniuse Compatibility is added
features: [],
version: environment.NPM_PACKAGE_DEPENDENCIES_CORE_JS,
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.update": {
library: "core-js",
relativePaths: ["modules/esnext.map.update.js"],
// TODO: Update when MDN or Caniuse Compatibility is added
features: [],
version: environment.NPM_PACKAGE_DEPENDENCIES_CORE_JS,
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.weak-map": {
library: "core-js",
relativePaths: ["modules/es.weak-map.js"],
Expand Down Expand Up @@ -2480,7 +2552,24 @@ export const constant: IConstant = {
polyfills: ["esnext.map", "esnext.weak-map", "esnext.set", "esnext.weak-set"]
},
"esnext.map": {
polyfills: ["es.map.filter", "es.map.from", "es.map.group-by", "es.map.key-by", "es.map.map-keys", "es.map.map-values", "es.map.merge", "es.map.of"]
polyfills: [
"es.map.every",
"es.map.filter",
"es.map.find",
"es.map.find-key",
"es.map.from",
"es.map.group-by",
"es.map.includes",
"es.map.key-by",
"es.map.key-of",
"es.map.map-keys",
"es.map.map-values",
"es.map.merge",
"es.map.of",
"es.map.reduce",
"es.map.some",
"es.map.update"
]
},
"esnext.weak-map": {
polyfills: ["es.weak-map.from", "es.weak-map.of"]
Expand Down
8 changes: 8 additions & 0 deletions src/polyfill/polyfill-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,22 @@ export declare type PolyfillDealiasedName =
| "es.number.to-precision"
| "es.number.from-string"
| "es.map"
| "es.map.every"
| "es.map.filter"
| "es.map.find"
| "es.map.find-key"
| "es.map.from"
| "es.map.group-by"
| "es.map.includes"
| "es.map.key-by"
| "es.map.key-of"
| "es.map.map-keys"
| "es.map.map-values"
| "es.map.merge"
| "es.map.of"
| "es.map.reduce"
| "es.map.some"
| "es.map.update"
| "es.weak-map"
| "es.weak-map.from"
| "es.weak-map.of"
Expand Down

0 comments on commit 1307877

Please sign in to comment.