Skip to content

Commit

Permalink
Merge pull request #2239 from tetsuharuohzeki/bump-min-es2020
Browse files Browse the repository at this point in the history
Use ES2020 as our ESM format
  • Loading branch information
tetsuharuohzeki committed May 11, 2024
2 parents 8ccb511 + 61bddb0 commit 1574eac
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ We target to run in following environments.
- [ECMA262 2017 edition](https://262.ecma-international.org/8.0/).
- TypeScript's latest version.
- Module system
- ES Module ([ES2015](https://262.ecma-international.org/6.0/) level).
- ES Module ([ES2020](https://262.ecma-international.org/11.0/) level).
- CommonJS
- A runtime environment or module bundler must support Node.js' [package.json's `exports` field](https://nodejs.org/api/packages.html#package-entry-points) (Newer is better).

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"devDependencies": {
"@babel/core": "^7.24.5",
"@babel/plugin-syntax-typescript": "^7.24.1",
"@babel/plugin-transform-export-namespace-from": "^7.24.1",
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@eslint/js": "^9.2.0",
"@reflink/reflink": "^0.1.16",
Expand Down
6 changes: 1 addition & 5 deletions packages/option-t/src/maybe/namespace.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
// We still use ES2015 as a module format.
// eslint-disable-next-line @typescript-eslint/naming-convention
import * as Maybe from './internal/intermediate_namespace.js';

export { Maybe };
export * as Maybe from './internal/intermediate_namespace.js';
6 changes: 1 addition & 5 deletions packages/option-t/src/nullable/namespace.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
// We still use ES2015 as a module format.
// eslint-disable-next-line @typescript-eslint/naming-convention
import * as Nullable from './internal/intermediate_namespace.js';

export { Nullable };
export * as Nullable from './internal/intermediate_namespace.js';
6 changes: 1 addition & 5 deletions packages/option-t/src/plain_option/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@
* Consider to use `Nullable<T>`, `Undefinable<T>`, or `Maybe<T>` to express an absence of a value.
* In JavaScript, they satisfy almost use cases. Probably, you might not have to use this type.
*/
// We still use ES2015 as a module format.
// eslint-disable-next-line @typescript-eslint/naming-convention
import * as Option from './internal/intermediate_namespace.js';

export { Option };
export * as Option from './internal/intermediate_namespace.js';
6 changes: 1 addition & 5 deletions packages/option-t/src/plain_result/namespace.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
// We still use ES2015 as a module format.
// eslint-disable-next-line @typescript-eslint/naming-convention
import * as Result from './internal/intermediate_namespace.js';

export { Result };
export * as Result from './internal/intermediate_namespace.js';
6 changes: 1 addition & 5 deletions packages/option-t/src/undefinable/namespace.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
// We still use ES2015 as a module format.
// eslint-disable-next-line @typescript-eslint/naming-convention
import * as Undefinable from './internal/intermediate_namespace.js';

export { Undefinable };
export * as Undefinable from './internal/intermediate_namespace.js';
1 change: 1 addition & 0 deletions packages/option-t/tools/babel/babelrc.cjs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ export default {
strict: true,
},
],
['@babel/plugin-transform-export-namespace-from', {}],
],
};
25 changes: 25 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1574eac

Please sign in to comment.