Skip to content

Commit

Permalink
feat(dsn-parser): ensure modern browser support
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Jul 28, 2023
1 parent a104f00 commit 1f4ab2b
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 119 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-pugs-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@httpx/dsn-parser': minor
---

Ensure modern browser support.
8 changes: 4 additions & 4 deletions examples/nextjs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
"axios": "1.4.0",
"ky": "0.33.3",
"next": "13.4.12",
"pino": "8.14.1",
"pino": "8.14.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"superjson": "1.13.1",
"zod": "3.21.4"
},
"devDependencies": {
"@belgattitude/eslint-config-bases": "1.37.0",
"@types/node": "20.4.4",
"@types/react": "18.2.15",
"@belgattitude/eslint-config-bases": "1.39.0",
"@types/node": "20.4.5",
"@types/react": "18.2.17",
"@types/react-dom": "18.2.7",
"cross-env": "7.0.3",
"eslint": "8.45.0",
Expand Down
5 changes: 2 additions & 3 deletions packages/dsn-parser/.size-limit.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ module.exports = [
{
name: 'JS (ESM)',
path: ['dist/index.mjs'],
limit: '1.20KB',
limit: '1.15KB',
},
{
name: 'JS (CJS)',
path: ['dist/index.cjs'],
limit: '1.20KB',
limit: '1.43KB',
},

];
1 change: 1 addition & 0 deletions packages/dsn-parser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DSN parser, validation utilities, and query string helper in a light and modern
[![size](https://img.shields.io/bundlephobia/minzip/@httpx/dsn-parser@latest?label=Max&style=for-the-badge&labelColor=333&color=informational)](https://bundlephobia.com/package/@httpx/dsn-parser@latest)
![bundles](https://img.shields.io/static/v1?label=&message=cjs|esm|treeshake&logo=webpack&style=for-the-badge&labelColor=444&color=informational)
![node](https://img.shields.io/static/v1?label=Node&message=16%2b&logo=node.js&style=for-the-badge&labelColor=444&color=informational)
[![browserslist](https://img.shields.io/static/v1?label=Browser&message=modern&logo=googlechrome&style=for-the-badge&labelColor=444&color=informational)](https://browserslist.dev/?q=ZGVmYXVsdHMgYW5kIHN1cHBvcnRzIGVzNi1tb2R1bGUsIG5vdCBkZWFkLCBub3Qgb3BfbWluaSBhbGwsIG5vZGUgMTY%3D)
[![codecov](https://img.shields.io/codecov/c/github/belgattitude/httpx?label=unit&logo=codecov&flag=dsnParserUnit&style=for-the-badge&labelColor=000000)](https://codecov.io/gh/belgattitude/httpx)
![types](https://img.shields.io/static/v1?label=typings&message=4.5%2B&logo=typescript&style=for-the-badge&labelColor=000000&color=9cf)
[![npm](https://img.shields.io/npm/dm/@httpx/dsn-parser?style=for-the-badge&labelColor=000000)](https://www.npmjs.com/package/@httpx/dsn-parser)
Expand Down
14 changes: 7 additions & 7 deletions packages/dsn-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
],
"sideEffects": false,
"browserslist": [
">0.5%",
"not IE 11",
"defaults and supports es6-module",
"not dead",
"not op_mini all",
"node 14.17"
"node 16"
],
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
Expand Down Expand Up @@ -57,7 +56,7 @@
"build-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-esm": "es-check --not './dist/*.map.js' -v es2020 --module './dist/**/*.mjs'",
"check-pub": "run-p check-pub-publint check-pub-attw",
"check-pub-publint": "publint --strict",
"check-pub-attw": "attw --pack",
Expand All @@ -80,18 +79,19 @@
"@types/jest": "29.5.3",
"@vitest/coverage-istanbul": "0.33.0",
"@vitest/ui": "0.33.0",
"browserslist-to-esbuild": "1.2.0",
"cross-env": "7.0.3",
"es-check": "7.1.1",
"eslint": "8.45.0",
"get-tsconfig": "4.6.2",
"npm-run-all": "4.1.5",
"publint": "0.1.16",
"publint": "0.2.0",
"rimraf": "5.0.1",
"size-limit": "8.2.6",
"tslib": "2.6.0",
"tslib": "2.6.1",
"tsup": "7.1.0",
"typedoc": "0.24.8",
"typedoc-plugin-markdown": "3.15.3",
"typedoc-plugin-markdown": "3.15.4",
"typescript": "5.1.6",
"vite": "4.4.7",
"vite-tsconfig-paths": "4.2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/dsn-parser/tsup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import browserslistToEsbuild from 'browserslist-to-esbuild';
import { defineConfig } from 'tsup';

export default defineConfig((options) => {
Expand All @@ -13,7 +14,7 @@ export default defineConfig((options) => {
};
},
platform: 'browser',
target: ['es2019', 'chrome90', 'firefox90', 'node16'],
target: browserslistToEsbuild(),
tsconfig: './tsconfig.build.json',
sourcemap: !options.watch,
minify: !options.watch,
Expand Down
2 changes: 1 addition & 1 deletion packages/exception/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"get-tsconfig": "4.6.2",
"jest": "29.6.2",
"npm-run-all": "4.1.5",
"publint": "0.1.16",
"publint": "0.2.0",
"rimraf": "5.0.1",
"rollup": "3.26.3",
"rollup-plugin-dts": "5.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/json-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"eslint": "8.45.0",
"get-tsconfig": "4.6.2",
"npm-run-all": "4.1.5",
"publint": "0.1.16",
"publint": "0.2.0",
"rimraf": "5.0.1",
"size-limit": "8.2.6",
"tslib": "2.6.1",
Expand Down
134 changes: 32 additions & 102 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1456,61 +1456,6 @@ __metadata:
languageName: node
linkType: hard

"@belgattitude/eslint-config-bases@npm:1.37.0":
version: 1.37.0
resolution: "@belgattitude/eslint-config-bases@npm:1.37.0"
dependencies:
"@rushstack/eslint-patch": "npm:^1.3.2"
"@tanstack/eslint-plugin-query": "npm:^4.29.25"
"@typescript-eslint/eslint-plugin": "npm:^5.61.0"
"@typescript-eslint/parser": "npm:^5.61.0"
eslint-config-prettier: "npm:^8.8.0"
eslint-import-resolver-typescript: "npm:^3.5.5"
eslint-plugin-import: "npm:^2.27.5"
eslint-plugin-jest: "npm:^27.2.3"
eslint-plugin-jest-formatting: "npm:^3.1.0"
eslint-plugin-jsx-a11y: "npm:^6.7.1"
eslint-plugin-playwright: "npm:^0.15.3"
eslint-plugin-prettier: "npm:^5.0.0"
eslint-plugin-react: "npm:^7.33.0"
eslint-plugin-react-hooks: "npm:^4.6.0"
eslint-plugin-regexp: "npm:^1.15.0"
eslint-plugin-sonarjs: "npm:^0.19.0"
eslint-plugin-storybook: "npm:^0.6.13"
eslint-plugin-testing-library: "npm:^5.11.0"
peerDependencies:
"@graphql-eslint/eslint-plugin": ^3.14.3
eslint: ^8.30.0
eslint-plugin-mdx: ^2.0.5
eslint-plugin-tailwindcss: ^3.13.0
graphql: ^16.6.0
prettier: ^2.8.0 || ^3.0.0
react: ^18.2.0
react-dom: ^18.2.0
typescript: ^4.9.4 || ^5.0.2
peerDependenciesMeta:
"@graphql-eslint/eslint-plugin":
optional: true
eslint-plugin-mdx:
optional: true
eslint-plugin-tailwindcss:
optional: true
graphql:
optional: true
prettier:
optional: true
react:
optional: true
react-dom:
optional: true
tailwindcss:
optional: true
typescript:
optional: true
checksum: 55c5f8e14be043811d79098bb1c219803863a2fd55fab79be2091749d1b46cfe40acbff7684ac570503b65f0fc247d96c29255ff91d0b9ac460d3069b6085e24
languageName: node
linkType: hard

"@belgattitude/eslint-config-bases@npm:1.39.0":
version: 1.39.0
resolution: "@belgattitude/eslint-config-bases@npm:1.39.0"
Expand Down Expand Up @@ -2334,18 +2279,18 @@ __metadata:
version: 0.0.0-use.local
resolution: "@examples/nextjs-app@workspace:examples/nextjs-app"
dependencies:
"@belgattitude/eslint-config-bases": "npm:1.37.0"
"@belgattitude/eslint-config-bases": "npm:1.39.0"
"@httpx/exception": "workspace:^"
"@types/node": "npm:20.4.4"
"@types/react": "npm:18.2.15"
"@types/node": "npm:20.4.5"
"@types/react": "npm:18.2.17"
"@types/react-dom": "npm:18.2.7"
axios: "npm:1.4.0"
cross-env: "npm:7.0.3"
eslint: "npm:8.45.0"
eslint-config-next: "npm:13.4.12"
ky: "npm:0.33.3"
next: "npm:13.4.12"
pino: "npm:8.14.1"
pino: "npm:8.14.2"
postcss: "npm:8.4.27"
react: "npm:18.2.0"
react-dom: "npm:18.2.0"
Expand Down Expand Up @@ -2382,18 +2327,19 @@ __metadata:
"@types/jest": "npm:29.5.3"
"@vitest/coverage-istanbul": "npm:0.33.0"
"@vitest/ui": "npm:0.33.0"
browserslist-to-esbuild: "npm:1.2.0"
cross-env: "npm:7.0.3"
es-check: "npm:7.1.1"
eslint: "npm:8.45.0"
get-tsconfig: "npm:4.6.2"
npm-run-all: "npm:4.1.5"
publint: "npm:0.1.16"
publint: "npm:0.2.0"
rimraf: "npm:5.0.1"
size-limit: "npm:8.2.6"
tslib: "npm:2.6.0"
tslib: "npm:2.6.1"
tsup: "npm:7.1.0"
typedoc: "npm:0.24.8"
typedoc-plugin-markdown: "npm:3.15.3"
typedoc-plugin-markdown: "npm:3.15.4"
typescript: "npm:5.1.6"
vite: "npm:4.4.7"
vite-tsconfig-paths: "npm:4.2.0"
Expand Down Expand Up @@ -2433,7 +2379,7 @@ __metadata:
get-tsconfig: "npm:4.6.2"
jest: "npm:29.6.2"
npm-run-all: "npm:4.1.5"
publint: "npm:0.1.16"
publint: "npm:0.2.0"
rimraf: "npm:5.0.1"
rollup: "npm:3.26.3"
rollup-plugin-dts: "npm:5.3.0"
Expand Down Expand Up @@ -2468,7 +2414,7 @@ __metadata:
eslint: "npm:8.45.0"
get-tsconfig: "npm:4.6.2"
npm-run-all: "npm:4.1.5"
publint: "npm:0.1.16"
publint: "npm:0.2.0"
rimraf: "npm:5.0.1"
size-limit: "npm:8.2.6"
tslib: "npm:2.6.1"
Expand Down Expand Up @@ -3862,13 +3808,6 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:20.4.4":
version: 20.4.4
resolution: "@types/node@npm:20.4.4"
checksum: 2efae59d93520e98d3d346160ae1d86ac57804e461250db60edd1253e06dbd2120e07659e535d536e70c7503b58828a84a03641fdde635c0d40d66a53ff0c8b8
languageName: node
linkType: hard

"@types/node@npm:^12.7.1":
version: 12.20.55
resolution: "@types/node@npm:12.20.55"
Expand Down Expand Up @@ -3913,14 +3852,14 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:*, @types/react@npm:18.2.15":
version: 18.2.15
resolution: "@types/react@npm:18.2.15"
"@types/react@npm:*, @types/react@npm:18.2.17":
version: 18.2.17
resolution: "@types/react@npm:18.2.17"
dependencies:
"@types/prop-types": "npm:*"
"@types/scheduler": "npm:*"
csstype: "npm:^3.0.2"
checksum: 282f3f86f94983ef1af1d66cb552b78131cf3650d29c3080e08a4de8f81489e5b6111c635ad59acf6984ce72281dfcf95004514985b84b5af35898d10414e84f
checksum: 13a74aebf0a7224ab3e1557aa6cfa5b93d6e11bb94f55d9ca88bd6873cd93e54c7cfcb3b495a777e987a7f8a59dc714860ae5cb5fd832ee8d9bde7e9a0b52b7e
languageName: node
linkType: hard

Expand Down Expand Up @@ -5038,7 +4977,16 @@ __metadata:
languageName: node
linkType: hard

"browserslist@npm:^4.14.5, browserslist@npm:^4.21.5, browserslist@npm:^4.21.9":
"browserslist-to-esbuild@npm:1.2.0":
version: 1.2.0
resolution: "browserslist-to-esbuild@npm:1.2.0"
dependencies:
browserslist: "npm:^4.17.3"
checksum: a6c1adc2ad8da0db23aa4f0b3c71e13561cbf61599e9acedc7890793d79aca250edb0f599095042e81587c88e87569bf3a1a68633026e81e4ac7548eb1c71b49
languageName: node
linkType: hard

"browserslist@npm:^4.14.5, browserslist@npm:^4.17.3, browserslist@npm:^4.21.5, browserslist@npm:^4.21.9":
version: 4.21.9
resolution: "browserslist@npm:4.21.9"
dependencies:
Expand Down Expand Up @@ -11118,9 +11066,9 @@ __metadata:
languageName: node
linkType: hard

"pino@npm:8.14.1":
version: 8.14.1
resolution: "pino@npm:8.14.1"
"pino@npm:8.14.2":
version: 8.14.2
resolution: "pino@npm:8.14.2"
dependencies:
atomic-sleep: "npm:^1.0.0"
fast-redact: "npm:^3.1.1"
Expand All @@ -11135,7 +11083,7 @@ __metadata:
thread-stream: "npm:^2.0.0"
bin:
pino: bin.js
checksum: 5955ff0934d3902f77bbfec1fa6a88fb9859ef66253c4b493fc624dccf09840350af8da93c4b22bca83ac348829fb8c17c77f3c12c12ff946b2cf7c10328aa55
checksum: 8c79b69d7558b3fc030ae25a724638b58d66c14990602a3cb8f18f829d6595e555533f618b8064d778b944f65bfd1302d43eda1f88c8b5c3d5babc75eb6c02df
languageName: node
linkType: hard

Expand Down Expand Up @@ -11395,16 +11343,16 @@ __metadata:
languageName: node
linkType: hard

"publint@npm:0.1.16":
version: 0.1.16
resolution: "publint@npm:0.1.16"
"publint@npm:0.2.0":
version: 0.2.0
resolution: "publint@npm:0.2.0"
dependencies:
npm-packlist: "npm:^5.1.3"
picocolors: "npm:^1.0.0"
sade: "npm:^1.8.1"
bin:
publint: lib/cli.js
checksum: 697277ced867c978c32c3f506eab9663969fc49d738575085bb6f05c48dc28f181e342efeade2af96c8f5cbfdaff66c646ff8bff738919a5e0b85d5150f31899
checksum: 8a39edb4f27535b507c91cd53eb87ef95d74015bb2386235ac0ca815f96362a18e9c9f5a34559419c7c2699ef25372cd2b19dee0e19a0770013ce3b90767c509
languageName: node
linkType: hard

Expand Down Expand Up @@ -13363,13 +13311,6 @@ __metadata:
languageName: node
linkType: hard

"tslib@npm:2.6.0":
version: 2.6.0
resolution: "tslib@npm:2.6.0"
checksum: 52360693c62761f902e1946b350188be6505de297068b33421cb26bedd99591203a74cb2a49e1f43f0922d59b1fb3499fe5cfe61a61ca65a1743d5c92c69720a
languageName: node
linkType: hard

"tslib@npm:2.6.1, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.5.0":
version: 2.6.1
resolution: "tslib@npm:2.6.1"
Expand Down Expand Up @@ -13529,17 +13470,6 @@ __metadata:
languageName: node
linkType: hard

"typedoc-plugin-markdown@npm:3.15.3":
version: 3.15.3
resolution: "typedoc-plugin-markdown@npm:3.15.3"
dependencies:
handlebars: "npm:^4.7.7"
peerDependencies:
typedoc: ">=0.24.0"
checksum: 525cd001a6b4dd2924fb8682b8469437368bdb7035eb161913fdb677e35cb5599ca08ef4a555ad8afaf0c6c632dac101bd6de6c2aed4d3408b598ec1cc5233a9
languageName: node
linkType: hard

"typedoc-plugin-markdown@npm:3.15.4":
version: 3.15.4
resolution: "typedoc-plugin-markdown@npm:3.15.4"
Expand Down

0 comments on commit 1f4ab2b

Please sign in to comment.