Skip to content

Commit

Permalink
try add Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
asukaminato0721 committed Aug 18, 2024
1 parent 286c9de commit ffd7c85
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 1 deletion.
1 change: 1 addition & 0 deletions DOWNLOAD_STATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
| `@nolyfill/es-iterator-helpers` | [![npm](https://img.shields.io/npm/dt/@nolyfill/es-iterator-helpers.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/es-iterator-helpers) |
| `@nolyfill/es-set-tostringtag` | [![npm](https://img.shields.io/npm/dt/@nolyfill/es-set-tostringtag.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/es-set-tostringtag) |
| `@nolyfill/es6-object-assign` | [![npm](https://img.shields.io/npm/dt/@nolyfill/es6-object-assign.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/es6-object-assign) |
| `@nolyfill/es6-promise` | [![npm](https://img.shields.io/npm/dt/@nolyfill/es6-promise.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/es6-promise) |
| `@nolyfill/function-bind` | [![npm](https://img.shields.io/npm/dt/@nolyfill/function-bind.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/function-bind) |
| `@nolyfill/function.prototype.name` | [![npm](https://img.shields.io/npm/dt/@nolyfill/function.prototype.name.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/function.prototype.name) |
| `@nolyfill/get-symbol-description` | [![npm](https://img.shields.io/npm/dt/@nolyfill/get-symbol-description.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/get-symbol-description) |
Expand Down
3 changes: 2 additions & 1 deletion create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ const autoGeneratedPackagesList = [
['promise.allsettled'],
['array.prototype.toreversed'],
['util.promisify', { '@nolyfill/safe-array-concat': 'workspace:*' }, '>=12.4.0'],
['typedarray.prototype.slice']
['typedarray.prototype.slice'],
['es6-promise']
] as const;

const singleFilePackagesList = [
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"es-iterator-helpers": "workspace:@nolyfill/es-iterator-helpers@*",
"es-set-tostringtag": "workspace:@nolyfill/es-set-tostringtag@*",
"es6-object-assign": "workspace:@nolyfill/es6-object-assign@*",
"es6-promise": "workspace:@nolyfill/es6-promise@*",
"function-bind": "workspace:@nolyfill/function-bind@*",
"function.prototype.name": "workspace:@nolyfill/function.prototype.name@*",
"get-symbol-description": "workspace:@nolyfill/get-symbol-description@*",
Expand Down Expand Up @@ -183,6 +184,7 @@
"es-iterator-helpers": "npm:@nolyfill/es-iterator-helpers@^1.0",
"es-set-tostringtag": "npm:@nolyfill/es-set-tostringtag@^1.0",
"es6-object-assign": "npm:@nolyfill/es6-object-assign@^1.0",
"es6-promise": "npm:@nolyfill/es6-promise@^1.0",
"function-bind": "npm:@nolyfill/function-bind@^1.0",
"function.prototype.name": "npm:@nolyfill/function.prototype.name@^1.0",
"get-symbol-description": "npm:@nolyfill/get-symbol-description@^1.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/data/es-shim-like/src/es6-promise.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { defineEsShim } from '@nolyfill/shared';

export default defineEsShim(Promise);
2 changes: 2 additions & 0 deletions packages/generated/es6-promise/auto.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';
/* noop */
2 changes: 2 additions & 0 deletions packages/generated/es6-promise/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e}});const e=(0,require("@nolyfill/shared").defineEsShim)(Promise);
Object.assign(exports.default, exports); module.exports = exports.default;
2 changes: 2 additions & 0 deletions packages/generated/es6-promise/implementation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';
module.exports = require('./entry.js').implementation;
2 changes: 2 additions & 0 deletions packages/generated/es6-promise/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';
module.exports = require('./entry.js').index();
21 changes: 21 additions & 0 deletions packages/generated/es6-promise/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "@nolyfill/es6-promise",
"version": "1.0.40",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/generated/es6-promise"
},
"main": "./index.js",
"license": "MIT",
"files": [
"*.js"
],
"scripts": {},
"dependencies": {
"@nolyfill/shared": "workspace:*"
},
"engines": {
"node": ">=12.4.0"
}
}
2 changes: 2 additions & 0 deletions packages/generated/es6-promise/polyfill.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';
module.exports = require('./entry.js').polyfill;
2 changes: 2 additions & 0 deletions packages/generated/es6-promise/shim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';
module.exports = require('./entry.js').shim;
1 change: 1 addition & 0 deletions packages/tools/cli/src/all-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const allPackages = [
"es-iterator-helpers",
"es-set-tostringtag",
"es6-object-assign",
"es6-promise",
"function-bind",
"function.prototype.name",
"get-symbol-description",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ffd7c85

Please sign in to comment.