Skip to content

Commit

Permalink
🔨 Upgrade to TS 5.7 and only output ESM in the package
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Dec 22, 2024
1 parent d9079cf commit 3fd48ed
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 63 deletions.
85 changes: 43 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 6 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@
"name": "@open-formulieren/formio-renderer",
"version": "0.1.0",
"description": "Alternative Form.io renderer made for Open Forms.",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/esm/index.d.ts",
"source": "src/index.tsx",
"exports": {
".": {
"import": "./lib/esm/index.js",
"require": "./lib/cjs/index.js",
"default": "./lib/cjs/index.js"
},
"./esm/": "./lib/esm/",
"./lib/": "./lib/"
},
"exports": "./dist/index.js",
"type": "module",
"types": "./dist/index.d.ts",
"scripts": {
"build:esm": "tspc -p tsconfig.prod.json && tsc-alias -p tsconfig.prod.json",
"build:cjs": "tspc -p tsconfig.prod.json --module commonjs --outDir lib/cjs && tsc-alias -p tsconfig.prod.json --outDir lib/cjs",
"build": "npm-run-all build:*",
"test": "npm-run-all test:*",
"test:storybook": "test-storybook",
Expand All @@ -31,7 +20,7 @@
"watch": "tspc -p tsconfig.prod.json --watch"
},
"files": [
"lib"
"dist"
],
"repository": {
"type": "git",
Expand Down Expand Up @@ -68,10 +57,10 @@
"react-dom": "^18.2.0",
"storybook": "^8.0.0",
"storybook-react-intl": "^3.0.1",
"ts-patch": "^3.1.2",
"ts-patch": "^3.3.0",
"tsc-alias": "^1.8.8",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.4.2"
"typescript": "^5.7.2"
},
"dependencies": {
"@storybook/test": "^8.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Dummy entrypoint
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"baseUrl": "src",
"outDir": "lib/esm",
"outDir": "dist",
"module": "esnext",
"target": "es2017",
"lib": ["dom"],
Expand All @@ -19,7 +19,7 @@
"allowSyntheticDefaultImports": true,
"noErrorTruncation": true,
"paths": {
"@/*": ["./*"],
"@/*": ["./*"]
},
"plugins": [
{
Expand All @@ -32,5 +32,5 @@
]
},
"include": ["src"],
"exclude": ["node_modules", "lib"]
"exclude": ["node_modules", "dist"]
}
2 changes: 1 addition & 1 deletion tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig",
"exclude": ["node_modules", "lib", "**/*.stories.*", "**/*.spec.*"]
"exclude": ["node_modules", "dist", "**/*.stories.*", "**/*.spec.*"]
}

0 comments on commit 3fd48ed

Please sign in to comment.