diff --git a/.changeset/strange-buses-mate.md b/.changeset/strange-buses-mate.md new file mode 100644 index 000000000..85dd82f0f --- /dev/null +++ b/.changeset/strange-buses-mate.md @@ -0,0 +1,5 @@ +--- +"@httpx/plain-object": major +--- + +Promote @httpx/plain-object to stable v1 diff --git a/docs/src/pages/plain-object.mdx b/docs/src/pages/plain-object.mdx index a3c1a2b81..74dd71785 100644 --- a/docs/src/pages/plain-object.mdx +++ b/docs/src/pages/plain-object.mdx @@ -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). diff --git a/examples/nextjs-app/package.json b/examples/nextjs-app/package.json index 081defa3f..2b8ddd660 100644 --- a/examples/nextjs-app/package.json +++ b/examples/nextjs-app/package.json @@ -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", @@ -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", diff --git a/packages/plain-object/.size-limit.cjs b/packages/plain-object/.size-limit.cjs index 912f610f4..881680b43 100644 --- a/packages/plain-object/.size-limit.cjs +++ b/packages/plain-object/.size-limit.cjs @@ -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"], @@ -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: "*", diff --git a/packages/plain-object/README.md b/packages/plain-object/README.md index 09965774b..00252abc8 100644 --- a/packages/plain-object/README.md +++ b/packages/plain-object/README.md @@ -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). diff --git a/yarn.lock b/yarn.lock index ac4db1ba7..c1694ddd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" @@ -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" @@ -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" @@ -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: @@ -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: @@ -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: @@ -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: @@ -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 @@ -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"