Skip to content

Commit

Permalink
feat: httpx/plain-object to v1 (#1334)
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude authored Aug 5, 2024
1 parent 831e925 commit e6a373c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 100 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-buses-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@httpx/plain-object": major
---

Promote @httpx/plain-object to stable v1
2 changes: 1 addition & 1 deletion docs/src/pages/plain-object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Bundle size is tracked by a [size-limit configuration](https://github.com/belgat
|----------------------------------------------------------|------------------:|
| `import { isPlainObject } from '@httpx/plain-object` | ~ 100B |
| `import { assertPlainObject } from '@httpx/plain-object` | ~ 160B |
| `isPlainObject + assertPlainObject` | ~ 325B |
| `isPlainObject + assertPlainObject` | ~ 170B |


> For CJS usage (not recommended) track the size on [bundlephobia](https://bundlephobia.com/package/@httpx/plain-object@latest).
Expand Down
6 changes: 3 additions & 3 deletions examples/nextjs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@httpx/dsn-parser": "workspace:^",
"@httpx/exception": "workspace:^",
"@httpx/memo-intl": "workspace:^",
"axios": "1.7.2",
"axios": "1.7.3",
"ky": "1.5.0",
"next": "14.2.5",
"pino": "9.3.2",
Expand All @@ -33,8 +33,8 @@
"zod": "3.23.8"
},
"devDependencies": {
"@belgattitude/eslint-config-bases": "5.16.0",
"@types/node": "22.0.2",
"@belgattitude/eslint-config-bases": "5.17.0",
"@types/node": "22.1.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react-swc": "3.7.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/plain-object/.size-limit.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
* @type {{name: string, path: string[], limit: string, import?: string, webpack?: boolean}[]}
*/
module.exports = [
{
name: 'Everything (ESM)',
path: ['dist/index.mjs'],
import: "*",
limit: '330B',
},
{
name: "Only { isPlainObject } (ESM)",
path: ["dist/index.mjs"],
Expand All @@ -21,6 +15,12 @@ module.exports = [
import: "{ assertPlainObject }",
limit: "164B",
},
{
name: "Import { assertPlainObject, isPlainObject } (ESM)",
path: ["dist/index.mjs"],
import: "{ assertPlainObject, isPlainObject }",
limit: "171B",
},
{
name: 'Everything (CJS)',
import: "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/plain-object/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Bundle size is tracked by a [size-limit configuration](https://github.com/belgat
|----------------------------------------------------------|------------------:|
| `import { isPlainObject } from '@httpx/plain-object` | ~ 100B |
| `import { assertPlainObject } from '@httpx/plain-object` | ~ 160B |
| `isPlainObject + assertPlainObject` | ~ 325B |
| `isPlainObject + assertPlainObject` | ~ 170B |


> For CJS usage (not recommended) track the size on [bundlephobia](https://bundlephobia.com/package/@httpx/plain-object@latest).
Expand Down
100 changes: 11 additions & 89 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -301,68 +301,6 @@ __metadata:
languageName: node
linkType: hard

"@belgattitude/eslint-config-bases@npm:5.16.0":
version: 5.16.0
resolution: "@belgattitude/eslint-config-bases@npm:5.16.0"
dependencies:
"@rushstack/eslint-patch": "npm:^1.10.4"
"@tanstack/eslint-plugin-query": "npm:^5.51.15"
"@typescript-eslint/eslint-plugin": "npm:^7.17.0"
"@typescript-eslint/parser": "npm:^7.17.0"
"@typescript-eslint/typescript-estree": "npm:^7.17.0"
"@typescript-eslint/utils": "npm:^7.17.0"
eslint-config-prettier: "npm:^9.1.0"
eslint-import-resolver-typescript: "npm:^3.6.1"
eslint-plugin-import: "npm:^2.29.1"
eslint-plugin-import-x: "npm:^3.1.0"
eslint-plugin-jest: "npm:^28.6.0"
eslint-plugin-jest-formatting: "npm:^3.1.0"
eslint-plugin-jsx-a11y: "npm:^6.9.0"
eslint-plugin-perfectionist: "npm:^3.0.0"
eslint-plugin-playwright: "npm:^1.6.2"
eslint-plugin-prettier: "npm:^5.2.1"
eslint-plugin-react: "npm:^7.35.0"
eslint-plugin-react-hooks: "npm:^4.6.2 || 5.0.0-canary-7118f5dd7-20230705"
eslint-plugin-regexp: "npm:^2.6.0"
eslint-plugin-simple-import-sort: "npm:^12.1.1"
eslint-plugin-sonarjs: "npm:^0.25.1"
eslint-plugin-storybook: "npm:^0.8.0"
eslint-plugin-testing-library: "npm:^6.2.2"
eslint-plugin-unicorn: "npm:^55.0.0"
eslint-plugin-unused-imports: "npm:^3.2.0"
peerDependencies:
"@graphql-eslint/eslint-plugin": ^3.20.1
eslint: ^8.57.0
eslint-plugin-mdx: ^3.1.5
eslint-plugin-tailwindcss: ^3.17.3
graphql: ^16.8.1
prettier: ">=3.2.0 <5.0.0"
react: ">=18.2.0"
react-dom: ">=18.2.0"
typescript: ^5.2.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: 10/6e0f3c5329176d107dac3e7292f19df6afd6a90e5de9d97dc2dd25c4f2bb872fa258e75f740bc2d4fc939830a15696b3c8e40af67f356fea3984862643c73e38
languageName: node
linkType: hard

"@belgattitude/eslint-config-bases@npm:5.17.0":
version: 5.17.0
resolution: "@belgattitude/eslint-config-bases@npm:5.17.0"
Expand Down Expand Up @@ -1404,18 +1342,18 @@ __metadata:
version: 0.0.0-use.local
resolution: "@examples/nextjs-app@workspace:examples/nextjs-app"
dependencies:
"@belgattitude/eslint-config-bases": "npm:5.16.0"
"@belgattitude/eslint-config-bases": "npm:5.17.0"
"@httpx/assert": "workspace:^"
"@httpx/dsn-parser": "workspace:^"
"@httpx/exception": "workspace:^"
"@httpx/memo-intl": "workspace:^"
"@types/node": "npm:22.0.2"
"@types/node": "npm:22.1.0"
"@types/react": "npm:18.3.3"
"@types/react-dom": "npm:18.3.0"
"@vitejs/plugin-react-swc": "npm:3.7.0"
"@vitest/coverage-v8": "npm:2.0.5"
"@vitest/ui": "npm:2.0.5"
axios: "npm:1.7.2"
axios: "npm:1.7.3"
cross-env: "npm:7.0.3"
eslint: "npm:8.57.0"
eslint-config-next: "npm:14.2.5"
Expand Down Expand Up @@ -3140,15 +3078,6 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:22.0.2":
version: 22.0.2
resolution: "@types/node@npm:22.0.2"
dependencies:
undici-types: "npm:~6.11.1"
checksum: 10/7f5937f22d5171df6d1764b838b64f03fd2686e0ebee15bb64eb609ee5280cfd8cbbb78efdf163bb49eee11c77de461ef8b85e2781e508d231777390ddf0e8ec
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 @@ -3258,7 +3187,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:^7.17.0, @typescript-eslint/eslint-plugin@npm:^7.18.0":
"@typescript-eslint/eslint-plugin@npm:^7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/eslint-plugin@npm:7.18.0"
dependencies:
Expand Down Expand Up @@ -3299,7 +3228,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:^7.17.0, @typescript-eslint/parser@npm:^7.18.0":
"@typescript-eslint/parser@npm:^7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/parser@npm:7.18.0"
dependencies:
Expand Down Expand Up @@ -3420,7 +3349,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:7.18.0, @typescript-eslint/typescript-estree@npm:^7.17.0, @typescript-eslint/typescript-estree@npm:^7.18.0":
"@typescript-eslint/typescript-estree@npm:7.18.0, @typescript-eslint/typescript-estree@npm:^7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/typescript-estree@npm:7.18.0"
dependencies:
Expand Down Expand Up @@ -3477,7 +3406,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:7.18.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0, @typescript-eslint/utils@npm:^7.16.1, @typescript-eslint/utils@npm:^7.17.0, @typescript-eslint/utils@npm:^7.18.0, @typescript-eslint/utils@npm:^7.4.0":
"@typescript-eslint/utils@npm:7.18.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0, @typescript-eslint/utils@npm:^7.16.1, @typescript-eslint/utils@npm:^7.18.0, @typescript-eslint/utils@npm:^7.4.0":
version: 7.18.0
resolution: "@typescript-eslint/utils@npm:7.18.0"
dependencies:
Expand Down Expand Up @@ -4351,14 +4280,14 @@ __metadata:
languageName: node
linkType: hard

"axios@npm:1.7.2, axios@npm:^1.4.0, axios@npm:^1.7.2":
version: 1.7.2
resolution: "axios@npm:1.7.2"
"axios@npm:1.7.3, axios@npm:^1.4.0, axios@npm:^1.7.2":
version: 1.7.3
resolution: "axios@npm:1.7.3"
dependencies:
follow-redirects: "npm:^1.15.6"
form-data: "npm:^4.0.0"
proxy-from-env: "npm:^1.1.0"
checksum: 10/6ae80dda9736bb4762ce717f1a26ff997d94672d3a5799ad9941c24d4fb019c1dff45be8272f08d1975d7950bac281f3ba24aff5ecd49ef5a04d872ec428782f
checksum: 10/7f92af205705a8fb4a9d35666b663729507657f252a1d39d83582590119941872d49078017cf992e32f47aa3b7317f5439f77be772a173dac2ae0fedd38f43ae
languageName: node
linkType: hard

Expand Down Expand Up @@ -14738,13 +14667,6 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.11.1":
version: 6.11.1
resolution: "undici-types@npm:6.11.1"
checksum: 10/bdee4c3d67626bf45f1502b817b96e328ff9c3c006ecafa3708bc39ba66d6cecc2d5d69d3148667bb833d3fb457c0e715bfeed0b7b6767fa4d3044f5c1036ba9
languageName: node
linkType: hard

"undici-types@npm:~6.13.0":
version: 6.13.0
resolution: "undici-types@npm:6.13.0"
Expand Down

0 comments on commit e6a373c

Please sign in to comment.