Skip to content

Commit

Permalink
feat: drop node 16 - build for es2022 (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Oct 25, 2023
1 parent 6872abb commit 5d3be6a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/nice-cooks-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@httpx/dsn-parser': minor
---

Drop node 16 support, es2022, slight bundle size decrease
4 changes: 2 additions & 2 deletions packages/dsn-parser/.size-limit.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ module.exports = [
{
name: 'JS (ESM)',
path: ['dist/index.mjs'],
limit: '1.30KB',
limit: '1.20KB',
},
{
name: 'JS (CJS)',
path: ['dist/index.cjs'],
limit: '1.43KB',
limit: '1.20KB',
},
];
8 changes: 4 additions & 4 deletions packages/dsn-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"defaults and supports es6-module",
"not dead",
"not op_mini all",
"node 16"
"node 18"
],
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
Expand Down Expand Up @@ -55,8 +55,8 @@
"docgen": "run-s docgen-typedoc",
"docgen-typedoc": "rimraf ./docs/api && typedoc --plugin typedoc-plugin-markdown --out ./docs/api",
"check-dist": "run-s check-dist-esm check-dist-cjs",
"check-dist-cjs": "es-check --not './dist/*.map.js' -v es2019 './dist/**/*.cjs'",
"check-dist-esm": "es-check --not './dist/*.map.js' -v es2019 --module './dist/**/*.mjs'",
"check-dist-cjs": "es-check --not './dist/*.map.js' -v es2022 './dist/**/*.cjs'",
"check-dist-esm": "es-check --not './dist/*.map.js' -v es2022 --module './dist/**/*.mjs'",
"check-pub": "run-p check-pub-publint check-pub-attw",
"check-pub-publint": "publint --strict",
"check-pub-attw": "attw --pack",
Expand Down Expand Up @@ -98,6 +98,6 @@
"vitest": "0.34.6"
},
"engines": {
"node": ">=16"
"node": ">=18"
}
}
6 changes: 5 additions & 1 deletion packages/dsn-parser/tsup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default defineConfig((options) => {
return {
entry: ['src/index.ts'],
splitting: true,
treeshake: true,
clean: true,
dts: true,
format: ['esm', 'cjs'],
Expand All @@ -14,7 +15,10 @@ export default defineConfig((options) => {
};
},
platform: 'browser',
target: ['es2019', ...browserslistToEsbuild()],
minifySyntax: true,
minifyWhitespace: true,
minifyIdentifiers: true,
target: ['es2022', ...browserslistToEsbuild()],
tsconfig: './tsconfig.build.json',
sourcemap: !options.watch,
minify: !options.watch,
Expand Down

0 comments on commit 5d3be6a

Please sign in to comment.