diff --git a/README.md b/README.md index 29aecf2..9c217fb 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Print the help message. ## Development -Add the definition in `packages/data/es-shim-like/src/` or `packages/data/single-file/src/` and `create.ts` , then `npm run codegen`. Notice that rarely used package will not be added, and some packages which are just sub-deps also won't be added. +Add the definition in `packages/data/es-shim-like/src/` or `packages/data/single-file/src/` or `packages/manual` and `create.ts` , then `npm run codegen`. Notice that rarely used package will not be added, and some packages which are just sub-deps also won't be added. ## Contributions diff --git a/create.ts b/create.ts index 64aa9e8..bde897b 100644 --- a/create.ts +++ b/create.ts @@ -88,8 +88,7 @@ const autoGeneratedPackagesList = [ ['promise.allsettled'], ['array.prototype.toreversed'], ['util.promisify', { '@nolyfill/safe-array-concat': 'workspace:*' }, '>=12.4.0'], - ['typedarray.prototype.slice'], - ['es6-promise'] + ['typedarray.prototype.slice'] ] as const; const singleFilePackagesList = [ @@ -149,7 +148,8 @@ const manualPackagesList = [ 'es-iterator-helpers', // use rollup prebundle approach 'assert', // use rollup prebundle approach 'set-function-length', // two entries (index.js, env.js) - 'is-core-module' // bundle + 'is-core-module', // bundle + 'es6-promise' // two entries (index.js, auto.js) ] as const; const nonNolyfillPackagesList = [ diff --git a/packages/data/es-shim-like/src/es6-promise.ts b/packages/data/es-shim-like/src/es6-promise.ts deleted file mode 100644 index 64f0871..0000000 --- a/packages/data/es-shim-like/src/es6-promise.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { defineEsShim } from '@nolyfill/shared'; - -export default defineEsShim(Promise); diff --git a/packages/manual/es6-promise/auto.js b/packages/manual/es6-promise/auto.js new file mode 100644 index 0000000..e69de29 diff --git a/packages/manual/es6-promise/index.js b/packages/manual/es6-promise/index.js new file mode 100644 index 0000000..f2ecc21 --- /dev/null +++ b/packages/manual/es6-promise/index.js @@ -0,0 +1,4 @@ +module.exports = { + polyfill() { }, + Promise +};