fix: js package resolution (#2737)

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
This commit is contained in:
Anshuman Pandey
2024-06-06 14:56:57 +05:30
committed by GitHub
parent bcceab4858
commit 53aef9ce0b
7 changed files with 93 additions and 11 deletions

View File

@@ -29,6 +29,17 @@
"import": "./dist/website.js",
"require": "./dist/website.umd.cjs",
"types": "./dist/website.d.ts"
},
"./*": "./dist/*"
},
"typesVersions": {
"*": {
"app": [
"./dist/app.d.ts"
],
"website": [
"./dist/website.d.ts"
]
}
},
"scripts": {

View File

@@ -3,8 +3,6 @@
"include": ["src", "package.json", "../types/surveys.d.ts"],
"compilerOptions": {
"strict": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,

View File

@@ -1,7 +1,7 @@
{
"name": "@formbricks/js",
"license": "MIT",
"version": "2.0.1",
"version": "2.1.0",
"description": "Formbricks-js allows you to connect your app to Formbricks, display surveys and trigger events.",
"homepage": "https://formbricks.com",
"repository": {
@@ -28,6 +28,17 @@
"import": "./dist/website.js",
"require": "./dist/website.cjs",
"types": "./dist/website.d.ts"
},
"./*": "./dist/*"
},
"typesVersions": {
"*": {
"app": [
"./dist/app.d.ts"
],
"website": [
"./dist/website.d.ts"
]
}
},
"scripts": {

View File

@@ -3,8 +3,6 @@
"include": ["src", "package.json"],
"compilerOptions": {
"strict": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"declaration": true,
"allowImportingTsExtensions": true,
"resolveJsonModule": true,

View File

@@ -1,5 +1,4 @@
import { useMemo, useState } from "preact/hooks";
// @ts-expect-error
import { JSXInternal } from "preact/src/jsx";
import { getOriginalFileNameFromUrl } from "@formbricks/lib/storage/utils";
@@ -101,6 +100,7 @@ export const FileInput = ({
const handleDragOver = (e: JSXInternal.TargetedDragEvent<HTMLLabelElement>) => {
e.preventDefault();
e.stopPropagation();
// @ts-expect-error
e.dataTransfer.dropEffect = "copy";
};
@@ -108,6 +108,7 @@ export const FileInput = ({
e.preventDefault();
e.stopPropagation();
// @ts-expect-error
handleFileSelection(e.dataTransfer.files);
};

View File

@@ -5,10 +5,10 @@
"compilerOptions": {
"outDir": "./dist",
"declaration": true,
"moduleResolution": "Bundler",
"lib": ["ESNext", "DOM"],
"module": "esnext",
"target": "ES2021",
"moduleResolution": "node",
"lib": ["es2022", "dom", "dom.iterable"],
"module": "ESNext",
"target": "ES2022",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,

65
pnpm-lock.yaml generated
View File

@@ -662,7 +662,7 @@ importers:
version: 5.2.11(terser@5.31.0)
vite-plugin-dts:
specifier: ^3.9.1
version: 3.9.1(typescript@5.4.5)(vite@5.2.11)
version: 3.9.1(typescript@4.9.5)(vite@5.2.11)
packages/js-core:
devDependencies:
@@ -11683,6 +11683,26 @@ packages:
'@vue/shared': 3.4.27
dev: true
/@vue/language-core@1.8.27(typescript@4.9.5):
resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@volar/language-core': 1.11.1
'@volar/source-map': 1.11.1
'@vue/compiler-dom': 3.4.27
'@vue/shared': 3.4.27
computeds: 0.0.1
minimatch: 9.0.4
muggle-string: 0.3.1
path-browserify: 1.0.1
typescript: 4.9.5
vue-template-compiler: 2.7.16
dev: true
/@vue/language-core@1.8.27(typescript@5.4.5):
resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==}
peerDependencies:
@@ -21832,6 +21852,12 @@ packages:
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
dev: false
/typescript@4.9.5:
resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/typescript@5.1.6:
resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==}
engines: {node: '>=14.17'}
@@ -22242,6 +22268,31 @@ packages:
- terser
dev: true
/vite-plugin-dts@3.9.1(typescript@4.9.5)(vite@5.2.11):
resolution: {integrity: sha512-rVp2KM9Ue22NGWB8dNtWEr+KekN3rIgz1tWD050QnRGlriUCmaDwa7qA5zDEjbXg5lAXhYMSBJtx3q3hQIJZSg==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
typescript: '*'
vite: '*'
peerDependenciesMeta:
vite:
optional: true
dependencies:
'@microsoft/api-extractor': 7.43.0
'@rollup/pluginutils': 5.1.0(rollup@3.29.4)
'@vue/language-core': 1.8.27(typescript@4.9.5)
debug: 4.3.4
kolorist: 1.8.0
magic-string: 0.30.10
typescript: 4.9.5
vite: 5.2.11(terser@5.31.0)
vue-tsc: 1.8.27(typescript@4.9.5)
transitivePeerDependencies:
- '@types/node'
- rollup
- supports-color
dev: true
/vite-plugin-dts@3.9.1(typescript@5.4.5)(vite@5.2.11):
resolution: {integrity: sha512-rVp2KM9Ue22NGWB8dNtWEr+KekN3rIgz1tWD050QnRGlriUCmaDwa7qA5zDEjbXg5lAXhYMSBJtx3q3hQIJZSg==}
engines: {node: ^14.18.0 || >=16.0.0}
@@ -22438,6 +22489,18 @@ packages:
he: 1.2.0
dev: true
/vue-tsc@1.8.27(typescript@4.9.5):
resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==}
hasBin: true
peerDependencies:
typescript: '*'
dependencies:
'@volar/typescript': 1.11.1
'@vue/language-core': 1.8.27(typescript@4.9.5)
semver: 7.6.2
typescript: 4.9.5
dev: true
/vue-tsc@1.8.27(typescript@5.4.5):
resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==}
hasBin: true