Skip to content

Commit

Permalink
feat(es.map): add support for the Stage-2 proposal Map.prototype.upsert
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Mar 4, 2020
1 parent 04c1103 commit 2315311
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ And, if you request `performance.now`, `date.now` will also be included since th
- `es.symbol.iterator`
- `es.symbol.constructor`
- `es.symbol.match`
- `es.symbol.match-all`
- `es.symbol.replace`
- `es.symbol.search`
- `es.symbol.species`
Expand Down Expand Up @@ -638,6 +639,7 @@ And, if you request `performance.now`, `date.now` will also be included since th
- `es.map.reduce`
- `es.map.some`
- `es.map.update`
- `es.map.upsert`
- **`esnext.weak-map`**
- `es.weak-map.from`
- `es.weak-map.of`
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
"chalk": "^2.4.2",
"console-polyfill": "^0.3.0",
"construct-style-sheets-polyfill": "^2.2.10",
"core-js": "^3.2.1",
"core-js-builder": "^3.2.1",
"devcert": "^1.0.2",
"core-js": "^3.6.4",
"core-js-builder": "^3.6.4",
"devcert": "^1.1.0",
"events-polyfill": "^2.1.2",
"file-type": "^12.3.0",
"find-up": "^4.1.0",
Expand Down Expand Up @@ -133,6 +133,10 @@
"types": "./dist/index.d.ts",
"typings": "./dist/index.d.ts",
"es2015": "./dist/index.js",
"funding": {
"type": "github",
"url": "https://github.com/wessberg/polyfiller?sponsor=1"
},
"repository": {
"type": "git",
"url": "https://github.com/wessberg/polyfiller.git"
Expand Down
12 changes: 11 additions & 1 deletion src/constant/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,15 @@ export const constant: IConstant = {
dependencies: ["es.map"],
contexts: ALL_CONTEXTS
},
"es.map.upsert": {
library: "core-js",
relativePaths: ["modules/esnext.map.upsert.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 @@ -2588,7 +2597,8 @@ export const constant: IConstant = {
"es.map.of",
"es.map.reduce",
"es.map.some",
"es.map.update"
"es.map.update",
"es.map.upsert"
]
},
"esnext.weak-map": {
Expand Down
1 change: 1 addition & 0 deletions src/polyfill/polyfill-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export declare type PolyfillDealiasedName =
| "es.map.reduce"
| "es.map.some"
| "es.map.update"
| "es.map.upsert"
| "es.weak-map"
| "es.weak-map.from"
| "es.weak-map.of"
Expand Down

0 comments on commit 2315311

Please sign in to comment.