Skip to content

Commit

Permalink
build: use generated package.json for React packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Nov 24, 2024
1 parent 7278c22 commit 709159c
Show file tree
Hide file tree
Showing 29 changed files with 1,820 additions and 748 deletions.
29 changes: 29 additions & 0 deletions .changeset/curvy-files-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"@utrecht/body-react": patch
"@utrecht/button-react": patch
"@utrecht/calendar-react": patch
"@utrecht/checkbox-group-react": patch
"@utrecht/checkbox-react": patch
"@utrecht/combobox-react": patch
"@utrecht/component-library-react": patch
"@utrecht/fieldset-react": patch
"@utrecht/form-field-checkbox-react": patch
"@utrecht/form-field-description-react": patch
"@utrecht/form-field-error-message-react": patch
"@utrecht/form-field-react": patch
"@utrecht/form-label-react": patch
"@utrecht/link-react": patch
"@utrecht/listbox-react": patch
"@utrecht/nav-bar-react": patch
"@utrecht/page-body-react": patch
"@utrecht/page-footer-react": patch
"@utrecht/page-header-react": patch
"@utrecht/page-layout-react": patch
"@utrecht/radio-button-react": patch
"@utrecht/radio-group-react": patch
"@utrecht/root-react": patch
"@utrecht/select-combobox-react": patch
"@utrecht/textbox-react": patch
---

Fix issue causing missing TypeScript `d.ts` files for React components.
29 changes: 29 additions & 0 deletions .changeset/flow-experiment-soil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"@utrecht/body-react": patch
"@utrecht/button-react": patch
"@utrecht/calendar-react": patch
"@utrecht/checkbox-group-react": patch
"@utrecht/checkbox-react": patch
"@utrecht/combobox-react": patch
"@utrecht/component-library-react": patch
"@utrecht/fieldset-react": patch
"@utrecht/form-field-checkbox-react": patch
"@utrecht/form-field-description-react": patch
"@utrecht/form-field-error-message-react": patch
"@utrecht/form-field-react": patch
"@utrecht/form-label-react": patch
"@utrecht/link-react": patch
"@utrecht/listbox-react": patch
"@utrecht/nav-bar-react": patch
"@utrecht/page-body-react": patch
"@utrecht/page-footer-react": patch
"@utrecht/page-header-react": patch
"@utrecht/page-layout-react": patch
"@utrecht/radio-button-react": patch
"@utrecht/radio-group-react": patch
"@utrecht/root-react": patch
"@utrecht/select-combobox-react": patch
"@utrecht/textbox-react": patch
---

Specify `exports` in `package.jon` for `.mjs` files in React components.
29 changes: 29 additions & 0 deletions .changeset/no-longer-required.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"@utrecht/body-react": patch
"@utrecht/button-react": patch
"@utrecht/calendar-react": patch
"@utrecht/checkbox-group-react": patch
"@utrecht/checkbox-react": patch
"@utrecht/combobox-react": patch
"@utrecht/component-library-react": patch
"@utrecht/fieldset-react": patch
"@utrecht/form-field-checkbox-react": patch
"@utrecht/form-field-description-react": patch
"@utrecht/form-field-error-message-react": patch
"@utrecht/form-field-react": patch
"@utrecht/form-label-react": patch
"@utrecht/link-react": patch
"@utrecht/listbox-react": patch
"@utrecht/nav-bar-react": patch
"@utrecht/page-body-react": patch
"@utrecht/page-footer-react": patch
"@utrecht/page-header-react": patch
"@utrecht/page-layout-react": patch
"@utrecht/radio-button-react": patch
"@utrecht/radio-group-react": patch
"@utrecht/root-react": patch
"@utrecht/select-combobox-react": patch
"@utrecht/textbox-react": patch
---

Remove CommonJS builds from React components, since in Developer Open Hour everyone assured me surely nobody uses `require()` anymore!
91 changes: 77 additions & 14 deletions packages/component-library-react/package.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,99 @@
{
"name": "@utrecht/component-library-react",
"version": "7.3.5",
"author": "Community for NL Design System",
"private": false,
"description": "React component library bundle for the Municipality of Utrecht based on the NL Design System architecture",
"license": "EUPL-1.2",
"name": "@utrecht/component-library-react",
"keywords": [
"nl-design-system"
],
"private": false,
"publishConfig": {
"access": "public"
"homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/component-library-react#readme",
"bugs": {
"url": "https://github.com/nl-design-system/utrecht/issues"
},
"repository": {
"type": "git+ssh",
"url": "git@github.com:nl-design-system/utrecht.git",
"url": "git+https://github.com/nl-design-system/utrecht.git",
"directory": "packages/component-library-react"
},
"license": "EUPL-1.2",
"author": "Community for NL Design System",
"sideEffects": false,
"type": "module",
"exports": {
".": "./dist/index.mjs",
"./dist": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
},
"./dist/index": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
},
"./dist/index.mjs": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
},
"./dist/VegaVisualization": {
"types": "./dist/VegaVisualization.d.ts",
"import": "./dist/VegaVisualization.mjs"
},
"./dist/VegaVisualization.mjs": {
"types": "./dist/VegaVisualization.d.ts",
"import": "./dist/VegaVisualization.mjs"
},
"./dist/Calendar": {
"types": "./dist/Calendar.d.ts",
"import": "./dist/Calendar.mjs"
},
"./dist/Calendar.mjs": {
"types": "./dist/Calendar.d.ts",
"import": "./dist/Calendar.mjs"
},
"./dist/css-module": {
"types": "./dist/css-module/index.d.ts",
"import": "./dist/css-module/index.mjs"
},
"./dist/css-module/index": {
"types": "./dist/css-module/index.d.ts",
"import": "./dist/css-module/index.mjs"
},
"./dist/css-module/index.mjs": {
"types": "./dist/css-module/index.d.ts",
"import": "./dist/css-module/index.mjs"
},
"./dist/css-module/VegaVisualization": {
"types": "./dist/css-module/VegaVisualization.d.ts",
"import": "./dist/css-module/VegaVisualization.mjs"
},
"./dist/css-module/VegaVisualization.mjs": {
"types": "./dist/css-module/VegaVisualization.d.ts",
"import": "./dist/css-module/VegaVisualization.mjs"
},
"./dist/css-module/Calendar": {
"types": "./dist/css-module/Calendar.d.ts",
"import": "./dist/css-module/Calendar.mjs"
},
"./dist/css-module/Calendar.mjs": {
"types": "./dist/css-module/Calendar.d.ts",
"import": "./dist/css-module/Calendar.mjs"
}
},
"files": [
"dist/",
"*.md"
],
"scripts": {
"build": "pnpm run '/^build:.*/'",
"build:rollup": "rollup --config rollup.config.mjs",
"build:rollup-components": "rollup --config rollup-components.config.mjs",
"build:test-results": "mkdir -p dist pages && jest --json --outputFile=dist/.jest-test-results.json --silent",
"clean": "rimraf dist/ pages/ .rollup.cache/ .swc",
"init": "init-react-package",
"lint-build": "tsc --project ./tsconfig.json --noEmit && tsc --project ./tsconfig.test.json",
"test": "mkdir -p pages && jest --coverage --verbose",
"watch:build": "rollup -c --watch",
"watch:test": "jest --verbose --watch"
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist/",
"*.md"
],
"dependencies": {
"@utrecht/button-react": "workspace:*",
"@utrecht/calendar-react": "workspace:*",
Expand Down Expand Up @@ -84,6 +143,7 @@
"@utrecht/badge-status-css": "workspace:*",
"@utrecht/blockquote-css": "workspace:*",
"@utrecht/breadcrumb-nav-css": "workspace:*",
"@utrecht/build-utils-react": "workspace:*",
"@utrecht/button-group-css": "workspace:*",
"@utrecht/button-link-css": "workspace:*",
"@utrecht/code-block-css": "workspace:*",
Expand Down Expand Up @@ -195,5 +255,8 @@
"vega": {
"optional": true
}
},
"publishConfig": {
"access": "public"
}
}
73 changes: 53 additions & 20 deletions packages/components-react/body-react/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,67 @@
{
"name": "@utrecht/body-react",
"version": "0.0.1",
"author": "Community for NL Design System",
"description": "Body component for the Municipality of Utrecht based on the NL Design System architecture",
"keywords": [
"nl-design-system"
],
"homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/body-react#readme",
"bugs": {
"url": "https://github.com/nl-design-system/utrecht/issues"
},
"repository": {
"type": "git+ssh",
"url": "git+https://github.com/nl-design-system/utrecht.git",
"directory": "packages/components-react/body-react"
},
"license": "EUPL-1.2",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"types": "./dist/index.d.ts",
"author": "Community for NL Design System",
"sideEffects": false,
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
},
"./css": {
"types": "./dist/css.d.ts",
"import": "./dist/css.mjs"
},
"./dist": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
},
"./dist/index": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
},
"./dist/index.mjs": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
},
"./dist/css": {
"types": "./dist/css.d.ts",
"import": "./dist/css.mjs"
},
"./dist/css.mjs": {
"types": "./dist/css.d.ts",
"import": "./dist/css.mjs"
}
},
"files": [
"dist/",
"src/"
],
"sideEffects": false,
"scripts": {
"clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage",
"build": "rollup --config ./rollup.config.mjs",
"clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage",
"init": "init-react-package",
"test": "mkdir -p pages && jest --coverage --verbose",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"clsx": "2.1.1"
},
"devDependencies": {
"@testing-library/dom": "8.20.1",
"@testing-library/jest-dom": "6.5.0",
Expand All @@ -26,31 +70,20 @@
"@types/jest": "29.5.13",
"@types/react": "18.3.3",
"@types/testing-library__jest-dom": "5.14.9",
"@utrecht/build-utils-react": "workspace:*",
"@utrecht/body-css": "workspace:*",
"@utrecht/build-utils-react": "workspace:*",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"react": "18.3.1",
"rollup": "4.23.0",
"typescript": "5.6.2"
},
"keywords": [
"nl-design-system"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/utrecht.git",
"directory": "packages/components-react/body-react"
},
"peerDependencies": {
"@babel/runtime": "*",
"react": "18",
"react-dom": "18"
},
"dependencies": {
"clsx": "2.1.1"
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 709159c

Please sign in to comment.