diff --git a/bin/wasm-node/CHANGELOG.md b/bin/wasm-node/CHANGELOG.md index 1d7ad5b33e..0d08058851 100644 --- a/bin/wasm-node/CHANGELOG.md +++ b/bin/wasm-node/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Changed + +- The JavaScript code now targets ES6. This should ensure compatibility on a wider range of platforms. ([#2565](https://github.com/paritytech/smoldot/pull/2565)) + ## 0.6.26 - 2022-07-20 ### Added diff --git a/bin/wasm-node/javascript/tsconfig-cjs.json b/bin/wasm-node/javascript/tsconfig-cjs.json index d3c03e1211..052d0ad10e 100644 --- a/bin/wasm-node/javascript/tsconfig-cjs.json +++ b/bin/wasm-node/javascript/tsconfig-cjs.json @@ -2,10 +2,11 @@ "extends": "./tsconfig.json", "compilerOptions": { "lib": [ - "es2015" + "es6" ], - "target": "es2015", + "target": "es6", "module": "commonjs", + "downlevelIteration": true, "outDir": "./dist/cjs", }, } diff --git a/bin/wasm-node/javascript/tsconfig-mjs.json b/bin/wasm-node/javascript/tsconfig-mjs.json index fbcf0562de..d7a08123f1 100644 --- a/bin/wasm-node/javascript/tsconfig-mjs.json +++ b/bin/wasm-node/javascript/tsconfig-mjs.json @@ -2,10 +2,11 @@ "extends": "./tsconfig.json", "compilerOptions": { "lib": [ - "es2020" + "es6", ], - "target": "es2020", - "module": "es2020", + "target": "es6", + "module": "es6", + "downlevelIteration": true, "outDir": "./dist/mjs", } }