diff --git a/package-lock.json b/package-lock.json index 417c2ee..f7d4cfe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,10 +35,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" }, "peerDependencies": { "react": "^18.2.0" @@ -20024,16 +20024,16 @@ } }, "node_modules/ts-patch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/ts-patch/-/ts-patch-3.1.2.tgz", - "integrity": "sha512-n58F5AqjUMdp9RAKq+E1YBkmONltPVbt1nN+wrmZXoYZek6QcvaTuqvKMhYhr5BxtC53kD/exxIPA1cP1RQxsA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ts-patch/-/ts-patch-3.3.0.tgz", + "integrity": "sha512-zAOzDnd5qsfEnjd9IGy1IRuvA7ygyyxxdxesbhMdutt8AHFjD8Vw8hU2rMF89HX1BKRWFYqKHrO8Q6lw0NeUZg==", "dev": true, "dependencies": { "chalk": "^4.1.2", - "global-prefix": "^3.0.0", + "global-prefix": "^4.0.0", "minimist": "^1.2.8", "resolve": "^1.22.2", - "semver": "^7.5.4", + "semver": "^7.6.3", "strip-ansi": "^6.0.1" }, "bin": { @@ -20073,17 +20073,17 @@ } }, "node_modules/ts-patch/node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-4.0.0.tgz", + "integrity": "sha512-w0Uf9Y9/nyHinEk5vMJKRie+wa4kR5hmDbEhGGds/kG1PwGLLHKRoNMeJOyCQjjBkANlnScqgzcFwGHgmgLkVA==", "dev": true, "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" + "ini": "^4.1.3", + "kind-of": "^6.0.3", + "which": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=16" } }, "node_modules/ts-patch/node_modules/has-flag": { @@ -20095,26 +20095,29 @@ "node": ">=8" } }, - "node_modules/ts-patch/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/ts-patch/node_modules/ini": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ts-patch/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" } }, "node_modules/ts-patch/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -20147,23 +20150,20 @@ } }, "node_modules/ts-patch/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, "dependencies": { - "isexe": "^2.0.0" + "isexe": "^3.1.1" }, "bin": { - "which": "bin/which" + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" } }, - "node_modules/ts-patch/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/tsc-alias": { "version": "1.8.8", "resolved": "https://registry.npmjs.org/tsc-alias/-/tsc-alias-1.8.8.tgz", @@ -20390,10 +20390,11 @@ } }, "node_modules/typescript": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", - "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index 2c6a0bc..35db11c 100644 --- a/package.json +++ b/package.json @@ -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", @@ -31,7 +20,7 @@ "watch": "tspc -p tsconfig.prod.json --watch" }, "files": [ - "lib" + "dist" ], "repository": { "type": "git", @@ -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", diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..3bc875e --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +// Dummy entrypoint diff --git a/tsconfig.json b/tsconfig.json index fae4d04..e1cadef 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "baseUrl": "src", - "outDir": "lib/esm", + "outDir": "dist", "module": "esnext", "target": "es2017", "lib": ["dom"], @@ -19,7 +19,7 @@ "allowSyntheticDefaultImports": true, "noErrorTruncation": true, "paths": { - "@/*": ["./*"], + "@/*": ["./*"] }, "plugins": [ { @@ -32,5 +32,5 @@ ] }, "include": ["src"], - "exclude": ["node_modules", "lib"] + "exclude": ["node_modules", "dist"] } diff --git a/tsconfig.prod.json b/tsconfig.prod.json index e2c4694..1a010f7 100644 --- a/tsconfig.prod.json +++ b/tsconfig.prod.json @@ -1,4 +1,4 @@ { "extends": "./tsconfig", - "exclude": ["node_modules", "lib", "**/*.stories.*", "**/*.spec.*"] + "exclude": ["node_modules", "dist", "**/*.stories.*", "**/*.spec.*"] }