From 955842d2123a89e760e80c327d26f4c6a6430526 Mon Sep 17 00:00:00 2001 From: FUJI Goro Date: Fri, 7 Feb 2025 19:16:03 +0900 Subject: [PATCH 1/2] target=2020 --- .gitignore | 3 +++ README.md | 10 +++++----- example/fetch-example.html | 2 +- example/{amd-example.html => umd-example.html} | 6 +++--- example/{amd-example.js => umd-example.js} | 0 mod.ts | 2 +- package.json | 12 ++++++------ tsconfig.dist.es5+esm.json => tsconfig.dist.esm.json | 6 ++---- tsconfig.dist.json | 1 - tsconfig.dist.webpack.json | 2 +- tsconfig.es5.json | 8 -------- tsconfig.json | 2 +- tsconfig.test-karma.json | 2 +- webpack.config.mjs | 11 +++-------- 14 files changed, 27 insertions(+), 40 deletions(-) rename example/{amd-example.html => umd-example.html} (66%) rename example/{amd-example.js => umd-example.js} (100%) rename tsconfig.dist.es5+esm.json => tsconfig.dist.esm.json (61%) delete mode 100644 tsconfig.es5.json diff --git a/.gitignore b/.gitignore index 9d27c3e5..7a381633 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ benchmark/sandbox.ts # v8 profiler logs isolate-*.log +# tsimp +.tsimp/ + # deno deno.lock diff --git a/README.md b/README.md index 10b2f1fa..3a29b4bc 100644 --- a/README.md +++ b/README.md @@ -632,11 +632,11 @@ Note that `JSON` cases use `Buffer` to emulate I/O where a JavaScript string mus The NPM package distributed in npmjs.com includes both ES2015+ and ES5 files: -* `dist/` is compiled into ES2019 with CommomJS, provided for NodeJS v10 -* `dist.es5+umd/` is compiled into ES5 with UMD - * `dist.es5+umd/msgpack.min.js` - the minified file - * `dist.es5+umd/msgpack.js` - the non-minified file -* `dist.es5+esm/` is compiled into ES5 with ES modules, provided for webpack-like bundlers and NodeJS's ESM-mode +* `dist/` is compiled into ES2020 with CommomJS, provided for NodeJS v10 +* `dist.umd/` is compiled into ES5 with UMD + * `dist.umd/msgpack.min.js` - the minified file + * `dist.umd/msgpack.js` - the non-minified file +* `dist.esm/` is compiled into ES2020 with ES modules, provided for webpack-like bundlers and NodeJS's ESM-mode If you use NodeJS and/or webpack, their module resolvers use the suitable one automatically. diff --git a/example/fetch-example.html b/example/fetch-example.html index 58f66def..d59c2503 100644 --- a/example/fetch-example.html +++ b/example/fetch-example.html @@ -3,7 +3,7 @@ - +