From 989b164d0e621e91b369094a5a537710811da2aa Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Tue, 9 Jan 2024 14:41:42 +1100 Subject: [PATCH] fix(package): maybe resolve some bundling issues --- package/client/resource/interface/context.ts | 2 +- package/client/resource/interface/input.ts | 2 +- package/client/resource/interface/menu.ts | 2 +- package/client/resource/interface/notify.ts | 4 +- package/client/resource/interface/radial.ts | 2 +- package/client/resource/interface/textui.ts | 2 +- package/package.json | 17 ++++---- package/pnpm-lock.yaml | 46 +++++++++----------- package/tsconfig.json | 9 ++-- 9 files changed, 40 insertions(+), 46 deletions(-) diff --git a/package/client/resource/interface/context.ts b/package/client/resource/interface/context.ts index 131c2bd..8a83401 100644 --- a/package/client/resource/interface/context.ts +++ b/package/client/resource/interface/context.ts @@ -1,4 +1,4 @@ -import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; +import type { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; type IconAnimation = 'spin' | 'spinPulse' | 'spinReverse' | 'pulse' | 'beat' | 'fade' | 'beatFade' | 'bounce' | 'shake'; diff --git a/package/client/resource/interface/input.ts b/package/client/resource/interface/input.ts index 49e2281..f5868c4 100644 --- a/package/client/resource/interface/input.ts +++ b/package/client/resource/interface/input.ts @@ -1,4 +1,4 @@ -import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; +import type { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; type Icon = IconName | [IconName, IconPrefix]; diff --git a/package/client/resource/interface/menu.ts b/package/client/resource/interface/menu.ts index 060e265..7d97976 100644 --- a/package/client/resource/interface/menu.ts +++ b/package/client/resource/interface/menu.ts @@ -1,4 +1,4 @@ -import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; +import type { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; type MenuPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; type ChangeFunction = (selected: number, scrollIndex?: number, args?: any, checked?: boolean) => void; diff --git a/package/client/resource/interface/notify.ts b/package/client/resource/interface/notify.ts index dc798c3..53a874a 100644 --- a/package/client/resource/interface/notify.ts +++ b/package/client/resource/interface/notify.ts @@ -1,5 +1,5 @@ -import { Sx } from '@mantine/core'; -import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; +import type { Sx } from '@mantine/core'; +import type { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; type NotificationPosition = | 'top' diff --git a/package/client/resource/interface/radial.ts b/package/client/resource/interface/radial.ts index dbb6aec..0d369dc 100644 --- a/package/client/resource/interface/radial.ts +++ b/package/client/resource/interface/radial.ts @@ -1,4 +1,4 @@ -import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; +import type { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; type RadialItem = { id: string; diff --git a/package/client/resource/interface/textui.ts b/package/client/resource/interface/textui.ts index 8d76281..a82a94a 100644 --- a/package/client/resource/interface/textui.ts +++ b/package/client/resource/interface/textui.ts @@ -1,4 +1,4 @@ -import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; +import type { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; import { CSSProperties } from 'react'; type IconAnimation = 'spin' | 'spinPulse' | 'spinReverse' | 'pulse' | 'beat' | 'fade' | 'beatFade' | 'bounce' | 'shake'; diff --git a/package/package.json b/package/package.json index 22e31f3..d15f930 100644 --- a/package/package.json +++ b/package/package.json @@ -3,7 +3,6 @@ "author": "Overextended", "version": "1.0.0", "description": "JS/TS wrapper for ox_lib exports", - "types": "./client/index.d.ts", "main": "index.js", "scripts": { "compile": "tsc", @@ -24,17 +23,17 @@ }, "license": "LGPL-3.0", "dependencies": { + "@mantine/core": "^6.0.10", + "@nativewrappers/client": "^1.7.33", + "fast-printf": "^1.6.9", + "typescript": "^5.3.3" + }, + "devDependencies": { + "@types/node": "16.9.1", + "@types/react": "^18.0.26", "@citizenfx/client": "2.0.5885-1", "@citizenfx/server": "2.0.5885-1", "@fortawesome/fontawesome-common-types": "6.1.1", - "@mantine/core": "^6.0.10", - "@nativewrappers/client": "^1.7.33", - "@types/node": "16.9.1", - "@types/react": "^18.0.26", - "fast-printf": "^1.6.9", - "typescript": "^4.9.4" - }, - "devDependencies": { "prettier": "^2.8.1" } } diff --git a/package/pnpm-lock.yaml b/package/pnpm-lock.yaml index 4c2c079..c9856b3 100644 --- a/package/pnpm-lock.yaml +++ b/package/pnpm-lock.yaml @@ -5,6 +5,20 @@ settings: excludeLinksFromLockfile: false dependencies: + '@mantine/core': + specifier: ^6.0.10 + version: 6.0.10(@emotion/react@11.11.0)(@mantine/hooks@6.0.10)(@types/react@18.0.26)(react-dom@18.2.0)(react@18.2.0) + '@nativewrappers/client': + specifier: ^1.7.33 + version: 1.7.33 + fast-printf: + specifier: ^1.6.9 + version: 1.6.9 + typescript: + specifier: ^5.3.3 + version: 5.3.3 + +devDependencies: '@citizenfx/client': specifier: 2.0.5885-1 version: 2.0.5885-1 @@ -14,26 +28,12 @@ dependencies: '@fortawesome/fontawesome-common-types': specifier: 6.1.1 version: 6.1.1 - '@mantine/core': - specifier: ^6.0.10 - version: 6.0.10(@emotion/react@11.11.0)(@mantine/hooks@6.0.10)(@types/react@18.0.26)(react-dom@18.2.0)(react@18.2.0) - '@nativewrappers/client': - specifier: ^1.7.33 - version: 1.7.33 '@types/node': specifier: 16.9.1 version: 16.9.1 '@types/react': specifier: ^18.0.26 version: 18.0.26 - fast-printf: - specifier: ^1.6.9 - version: 1.6.9 - typescript: - specifier: ^4.9.4 - version: 4.9.4 - -devDependencies: prettier: specifier: ^2.8.1 version: 2.8.1 @@ -91,11 +91,11 @@ packages: /@citizenfx/client@2.0.5885-1: resolution: {integrity: sha512-Ba5YYfxhZ82PcOY+2rjqDElTzPt7NrN6/o2U+wYPKK2VU/wRdCsMonpMsr7dYob2ToN5Qe96w5VNI3m5OrouJQ==} - dev: false + dev: true /@citizenfx/server@2.0.5885-1: resolution: {integrity: sha512-q8KRecfjJ3RjCfBT/3CSHNTr2efUs9uq8pIoPF4TGkn5X7jgTBprrp3VMayaee3Xekay3RTufpzsOaeHUntQeA==} - dev: false + dev: true /@emotion/babel-plugin@11.11.0: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} @@ -224,7 +224,7 @@ packages: resolution: {integrity: sha512-wVn5WJPirFTnzN6tR95abCx+ocH+3IFLXAgyavnf9hUmN0CfWoDjPT/BAWsUVwSlYYVBeCLJxaqi7ZGe4uSjBA==} engines: {node: '>=6'} requiresBuild: true - dev: false + dev: true /@mantine/core@6.0.10(@emotion/react@11.11.0)(@mantine/hooks@6.0.10)(@types/react@18.0.26)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-Q8HdRTBkQDs6LEtklpYm6efz2WaV6T5rvgjUOfXq0z44G/XYM+P1B1BSFnHvUDkeWYLcGkK6aPI5Uxc0GEN04w==} @@ -395,7 +395,7 @@ packages: /@types/node@16.9.1: resolution: {integrity: sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==} - dev: false + dev: true /@types/parse-json@4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} @@ -403,7 +403,6 @@ packages: /@types/prop-types@15.7.5: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} - dev: false /@types/react@18.0.26: resolution: {integrity: sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==} @@ -411,11 +410,9 @@ packages: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 csstype: 3.1.1 - dev: false /@types/scheduler@0.16.2: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} - dev: false /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} @@ -494,7 +491,6 @@ packages: /csstype@3.1.1: resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} - dev: false /detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} @@ -774,9 +770,9 @@ packages: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} dev: false - /typescript@4.9.4: - resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} - engines: {node: '>=4.2.0'} + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} hasBin: true dev: false diff --git a/package/tsconfig.json b/package/tsconfig.json index bea4a00..5750047 100644 --- a/package/tsconfig.json +++ b/package/tsconfig.json @@ -2,17 +2,16 @@ "compilerOptions": { "baseUrl": ".", "strict": true, - "module": "CommonJS", + "module": "es2020", "types": ["@types/node", "@citizenfx/client", "@citizenfx/server"], "declaration": true, - "sourceMap": true, - "target": "ESNext", + "target": "es2021", "allowJs": false, - "lib": ["ESNext"], + "lib": ["es2021"], "resolveJsonModule": true, "esModuleInterop": true, "skipLibCheck": true, - "moduleResolution": "node", + "moduleResolution": "bundler", "experimentalDecorators": true, "noImplicitAny": true },