diff --git a/CHANGELIST.md b/CHANGELIST.md index 11e658c..47a80f5 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -4,6 +4,7 @@ - [#488](https://github.com/nevware21/ts-async/issues/488) [CHORE] Drop Node.js 16 from CI matrix and add Node.js 24 - Node.js 16 is end-of-life and is no longer supported by key tooling dependencies (for example `puppeteer` and `@pnpm/error` require Node.js >= 18) +- [#499](https://github.com/nevware21/ts-async/issues/499) [BUG] Add the required ES Promise / Iterable / AsyncIterable libs to the package tsconfig and document the consumer ES2018 lib requirement # v0.5.5 Jan 5th, 2026 diff --git a/README.md b/README.md index 635d022..3b3a773 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,11 @@ Install the npm packare: `npm install @nevware21/ts-async --save` > "@nevware21/ts-async": ">= 0.5.5 < 2.x" > ``` +This package still targets ES5 at runtime, but its public TypeScript types use later built-in definitions such as `Promise`, `Iterable`, and `AsyncIterable`. If your project currently compiles with only ES5 libs, update your `tsconfig.json` to include a later ES lib, for example: + +- Browser / mixed environments: `"lib": ["ES2018", "DOM"]` +- Node-only environments: `"lib": ["ES2018"]` + And then just import the helpers and use them. ### Simple Examples diff --git a/common/config/rush/npm-shrinkwrap.json b/common/config/rush/npm-shrinkwrap.json index e5f47f3..da55f6c 100644 --- a/common/config/rush/npm-shrinkwrap.json +++ b/common/config/rush/npm-shrinkwrap.json @@ -3012,9 +3012,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.5.359", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.359.tgz", - "integrity": "sha512-8lPELWuYZIWk7NDvCNthtmMw/7Q5Wu25NpM4djFMHBmk8DubPAtL4YTOp7ou0e7HyJtwkVlWv8XMLURnrtgJQw==" + "version": "1.5.360", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.360.tgz", + "integrity": "sha512-GkcBt6YYAw9SxFWn+xVar4cLVGlXVuswwtRLBozi2zp0GjXs4ZnOrqV4zbXzg35n7w81hCkyJNYicgXlVHAmBA==" }, "node_modules/elliptic": { "version": "6.6.1", @@ -6385,9 +6385,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.4.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.4.0.tgz", - "integrity": "sha512-W+R+kFL4HgVxONq2bhXPi3bGpzGe/yEhVOp233qw9wCRtgncJ15P3bC+e4zZMu4Cq7d+WAJjXGW0uUkifhcatA==", + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.0.tgz", + "integrity": "sha512-5YgH9UJd7wVb9hIouI2adWpgqrrICkt070Dnj8EUY1+B4B2P9eRLPAkAAo6NICA7CEhOIeBHl46u9zSNpNu7zA==", "engines": { "node": "20 || >=22" } diff --git a/lib/tsconfig.es6.json b/lib/tsconfig.es6.json index e079dfa..9976723 100644 --- a/lib/tsconfig.es6.json +++ b/lib/tsconfig.es6.json @@ -1,7 +1,12 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { + "lib": [ + "dom", + "es6", + "es2018.asynciterable" + ], "target": "es6", "outDir": "./build/es6" } -} \ No newline at end of file +} diff --git a/lib/tsconfig.json b/lib/tsconfig.json index 6b9580d..b8f9fe8 100644 --- a/lib/tsconfig.json +++ b/lib/tsconfig.json @@ -1,10 +1,16 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { + "lib": [ + "dom", + "es2015.promise", + "es2015.iterable", + "es2018.asynciterable" + ], "target": "es5", "declaration": true, "declarationDir": "./build/types", "removeComments": false, "outDir": "./build/es5" } -} \ No newline at end of file +}