Bump target to es2018

This commit is contained in:
Simon Warta 2022-01-27 09:52:49 +01:00
parent c22757ceb4
commit 6595521956
6 changed files with 10 additions and 11 deletions

View File

@ -8,6 +8,7 @@ and this project adheres to
### Changed ### Changed
- all: The TypeScript compilation target is now ES2018.
- @cosmjs/stargate: The `AminoTypes` now always requires an argument of type - @cosmjs/stargate: The `AminoTypes` now always requires an argument of type
`AminoTypesOptions`. This is an object with a required `prefix` field. Before `AminoTypesOptions`. This is an object with a required `prefix` field. Before
the prefix defaulted to "cosmos" but this is almost never the right choice for the prefix defaulted to "cosmos" but this is almost never the right choice for

View File

@ -90,12 +90,12 @@ Currently the codebase supports the following runtime environments:
[Edge Spartan](https://en.wikipedia.org/wiki/Microsoft_Edge#Development)) [Edge Spartan](https://en.wikipedia.org/wiki/Microsoft_Edge#Development))
3. Browser extensions (Chromium/Firefox) 3. Browser extensions (Chromium/Firefox)
Our current JavaScript target standard is ES2017, giving us native async/await Our current JavaScript target standard is ES2018. We use WebAssembly to
support. We use WebAssembly to implement certain cryptographic functions. implement certain cryptographic functions.
We're happy to adjust this list according to users' needs as long as you don't We're happy to adjust this list according to users' needs as long as you don't
ask for Internet Explorer support. If your environment does not support Wasm, we ask for Internet Explorer support. If your environment does not support Wasm, we
can work on a solution with swapable implementations. can work on a solution with swappable implementations.
## Roadmap ## Roadmap

View File

@ -3,7 +3,7 @@
"esModuleInterop": true, "esModuleInterop": true,
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"target": "es2017", "target": "es2018",
"noUnusedLocals": false, "noUnusedLocals": false,
"noImplicitAny": false "noImplicitAny": false
} }

View File

@ -67,7 +67,5 @@ export function isJsonCompatibleDictionary(data: unknown): data is JsonCompatibl
return false; return false;
} }
// TODO: replace with Object.values when available (ES2017+) return Object.values(data).every(isJsonCompatibleValue);
const values = Object.getOwnPropertyNames(data).map((key) => (data as any)[key]);
return values.every(isJsonCompatibleValue);
} }

View File

@ -4,7 +4,7 @@
"baseUrl": ".", "baseUrl": ".",
"outDir": "build", "outDir": "build",
"rootDir": "src", "rootDir": "src",
"lib": ["es2017", "dom"] "lib": ["es2018", "dom"]
}, },
"include": ["src/**/*"] "include": ["src/**/*"]
} }

View File

@ -4,7 +4,8 @@
"declaration": true, "declaration": true,
"esModuleInterop": true, "esModuleInterop": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"lib": ["es2017"], "lib": ["es2018"],
"target": "es2018",
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"newLine": "LF", "newLine": "LF",
@ -18,7 +19,6 @@
"removeComments": false, "removeComments": false,
"resolveJsonModule": true, "resolveJsonModule": true,
"sourceMap": true, "sourceMap": true,
"strict": true, "strict": true
"target": "es2017"
} }
} }