twenty/packages/twenty-front/package.json

90 lines
3 KiB
JSON
Raw Normal View History

2022-12-01 14:58:08 +00:00
{
"name": "twenty-front",
2025-04-02 07:23:17 +00:00
"version": "0.51.0-canary",
2022-12-01 14:58:08 +00:00
"private": true,
Move frontend to Vite 5 (#2775) * merge squashed - A couple of CJS modules into ESM (config mostly) - Vite complains about node.js modules: fixed `useIsMatchingLocation.ts` > or use rollupOptions in vite.config.ts > ref: https://github.com/saleor/saleor-dashboard/blob/f0e4f59d97e2a8c3e22bd2af7b7ce68a361fc9a4/vite.config.js#L6 - Adjust Storybook to work with Vite: use @storybook/test - Use SWC for jest tranformations - Remove unused deps: - ts-jest: replaced with @swc/jest, typecheck by `tsc` - babel plugins - @svgr/plugin-jsx: not used - @testing-library/user-event: handled by @storybook/test - @typescript-eslint/utils: was not plugged in - tsup, esbuild-plugin-svgr: will look into that later - Install Vite required deps, and remove craco/webpack deps - Adjust SVG to work with Vite as components - Fixed `Step.tsx`: I dont know if one should be swaped for the other, but there should be no slash - Initial formating and linting: - removed empty object params - sorting imports, etc.. * prettier: fix pattern * coverage: sb coverage report isnt working * Add missing pieces * `yarn lint --fix` * fix: scripts permissions * tsc: cut errors in half * fix: remove `react-app-env.d.ts` * tsc: all fixed, except `react-data-grid` types issue * eslint: ignore env-config.js * eslint: Align ci with config * msw: bypass testing warnings ref: https://stackoverflow.com/questions/68024935/msw-logging-warnings-for-unhandled-supertest-requests * rebase: and fix things * Adjust to current `graphql-codegen` no ESM support * Remove vite plugin and use built-in methods * rebase: and some fixes * quick fix + `corepack use yarn@1.22.19` * Fix build errors --------- Co-authored-by: Charles Bochet <charles@twenty.com>
2023-12-10 15:22:43 +00:00
"type": "module",
"scripts": {
"build": "VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true NODE_OPTIONS=--max-old-space-size=4500 npx vite build && sh ./scripts/inject-runtime-env.sh",
"build:sourcemaps": "VITE_BUILD_SOURCEMAP=true VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true NODE_OPTIONS=--max-old-space-size=7000 npx vite build && sh ./scripts/inject-runtime-env.sh",
"start:prod": "NODE_ENV=production npx vite --host",
"tsup": "npx tsup"
Move frontend to Vite 5 (#2775) * merge squashed - A couple of CJS modules into ESM (config mostly) - Vite complains about node.js modules: fixed `useIsMatchingLocation.ts` > or use rollupOptions in vite.config.ts > ref: https://github.com/saleor/saleor-dashboard/blob/f0e4f59d97e2a8c3e22bd2af7b7ce68a361fc9a4/vite.config.js#L6 - Adjust Storybook to work with Vite: use @storybook/test - Use SWC for jest tranformations - Remove unused deps: - ts-jest: replaced with @swc/jest, typecheck by `tsc` - babel plugins - @svgr/plugin-jsx: not used - @testing-library/user-event: handled by @storybook/test - @typescript-eslint/utils: was not plugged in - tsup, esbuild-plugin-svgr: will look into that later - Install Vite required deps, and remove craco/webpack deps - Adjust SVG to work with Vite as components - Fixed `Step.tsx`: I dont know if one should be swaped for the other, but there should be no slash - Initial formating and linting: - removed empty object params - sorting imports, etc.. * prettier: fix pattern * coverage: sb coverage report isnt working * Add missing pieces * `yarn lint --fix` * fix: scripts permissions * tsc: cut errors in half * fix: remove `react-app-env.d.ts` * tsc: all fixed, except `react-data-grid` types issue * eslint: ignore env-config.js * eslint: Align ci with config * msw: bypass testing warnings ref: https://stackoverflow.com/questions/68024935/msw-logging-warnings-for-unhandled-supertest-requests * rebase: and fix things * Adjust to current `graphql-codegen` no ESM support * Remove vite plugin and use built-in methods * rebase: and some fixes * quick fix + `corepack use yarn@1.22.19` * Fix build errors --------- Co-authored-by: Charles Bochet <charles@twenty.com>
2023-12-10 15:22:43 +00:00
},
"engines": {
"node": "^18.17.1",
"npm": "please-use-yarn",
"yarn": "^4.0.2"
Move frontend to Vite 5 (#2775) * merge squashed - A couple of CJS modules into ESM (config mostly) - Vite complains about node.js modules: fixed `useIsMatchingLocation.ts` > or use rollupOptions in vite.config.ts > ref: https://github.com/saleor/saleor-dashboard/blob/f0e4f59d97e2a8c3e22bd2af7b7ce68a361fc9a4/vite.config.js#L6 - Adjust Storybook to work with Vite: use @storybook/test - Use SWC for jest tranformations - Remove unused deps: - ts-jest: replaced with @swc/jest, typecheck by `tsc` - babel plugins - @svgr/plugin-jsx: not used - @testing-library/user-event: handled by @storybook/test - @typescript-eslint/utils: was not plugged in - tsup, esbuild-plugin-svgr: will look into that later - Install Vite required deps, and remove craco/webpack deps - Adjust SVG to work with Vite as components - Fixed `Step.tsx`: I dont know if one should be swaped for the other, but there should be no slash - Initial formating and linting: - removed empty object params - sorting imports, etc.. * prettier: fix pattern * coverage: sb coverage report isnt working * Add missing pieces * `yarn lint --fix` * fix: scripts permissions * tsc: cut errors in half * fix: remove `react-app-env.d.ts` * tsc: all fixed, except `react-data-grid` types issue * eslint: ignore env-config.js * eslint: Align ci with config * msw: bypass testing warnings ref: https://stackoverflow.com/questions/68024935/msw-logging-warnings-for-unhandled-supertest-requests * rebase: and fix things * Adjust to current `graphql-codegen` no ESM support * Remove vite plugin and use built-in methods * rebase: and some fixes * quick fix + `corepack use yarn@1.22.19` * Fix build errors --------- Co-authored-by: Charles Bochet <charles@twenty.com>
2023-12-10 15:22:43 +00:00
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"msw": {
"workerDirectory": "public"
},
"dependencies": {
Export Notes to PDF/Word Feature Implementation (#8439) (#9269) Closes #8439 ## Overview This PR implements functionality to export notes/tasks to PDF and Word formats. https://github.com/user-attachments/assets/67eaf4eb-cabc-45ba-8727-13f22ba31067 ## Testing - [x] Verified that the export functionality works for both notes and tasks, whether exporting immediately after opening the editor or after editing. - [x] Ensured the export button appears in the action menu only when the object is a note/task. - [x] Ensured the export button appears in the RightDrawerActionMenuDropdown for a note/task. ## Notes - The code already supports exporting to Word, but only PDF export is currently available. To enable Word export, we just need a UI option allowing users to choose between PDF and Word. - After upgrading the Blocknote packages to the latest version, dependency conflicts arose with tiptap and prosemirror-model. To address this, all tiptap dependencies were consolidated in the root package.json, and a resolution was added for prosemirror-model. Also, some methods in CustomAddBlockItem.tsx were missing in the newer version, so I updated the code to accommodate these changes. - Exporting a note with an image works only if the image is embedded, as Blocknote doesn’t support actual image uploads. Uploaded images are omitted in the PDF export, while the text is retained. --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-30 08:16:44 +00:00
"@blocknote/xl-docx-exporter": "^0.22.0",
"@blocknote/xl-pdf-exporter": "^0.22.0",
"@cyntler/react-doc-viewer": "^1.17.0",
"@lingui/core": "^5.1.2",
"@lingui/detect-locale": "^5.2.0",
2025-03-18 13:57:06 +00:00
"@lingui/react": "^5.1.2",
"@nivo/calendar": "^0.87.0",
"@nivo/core": "^0.87.0",
"@nivo/line": "^0.87.0",
Export Notes to PDF/Word Feature Implementation (#8439) (#9269) Closes #8439 ## Overview This PR implements functionality to export notes/tasks to PDF and Word formats. https://github.com/user-attachments/assets/67eaf4eb-cabc-45ba-8727-13f22ba31067 ## Testing - [x] Verified that the export functionality works for both notes and tasks, whether exporting immediately after opening the editor or after editing. - [x] Ensured the export button appears in the action menu only when the object is a note/task. - [x] Ensured the export button appears in the RightDrawerActionMenuDropdown for a note/task. ## Notes - The code already supports exporting to Word, but only PDF export is currently available. To enable Word export, we just need a UI option allowing users to choose between PDF and Word. - After upgrading the Blocknote packages to the latest version, dependency conflicts arose with tiptap and prosemirror-model. To address this, all tiptap dependencies were consolidated in the root package.json, and a resolution was added for prosemirror-model. Also, some methods in CustomAddBlockItem.tsx were missing in the newer version, so I updated the code to accommodate these changes. - Exporting a note with an image works only if the image is embedded, as Blocknote doesn’t support actual image uploads. Uploaded images are omitted in the PDF export, while the text is retained. --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-30 08:16:44 +00:00
"@react-pdf/renderer": "^4.1.6",
"@scalar/api-reference-react": "^0.4.36",
Export Notes to PDF/Word Feature Implementation (#8439) (#9269) Closes #8439 ## Overview This PR implements functionality to export notes/tasks to PDF and Word formats. https://github.com/user-attachments/assets/67eaf4eb-cabc-45ba-8727-13f22ba31067 ## Testing - [x] Verified that the export functionality works for both notes and tasks, whether exporting immediately after opening the editor or after editing. - [x] Ensured the export button appears in the action menu only when the object is a note/task. - [x] Ensured the export button appears in the RightDrawerActionMenuDropdown for a note/task. ## Notes - The code already supports exporting to Word, but only PDF export is currently available. To enable Word export, we just need a UI option allowing users to choose between PDF and Word. - After upgrading the Blocknote packages to the latest version, dependency conflicts arose with tiptap and prosemirror-model. To address this, all tiptap dependencies were consolidated in the root package.json, and a resolution was added for prosemirror-model. Also, some methods in CustomAddBlockItem.tsx were missing in the newer version, so I updated the code to accommodate these changes. - Exporting a note with an image works only if the image is embedded, as Blocknote doesn’t support actual image uploads. Uploaded images are omitted in the PDF export, while the text is retained. --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-30 08:16:44 +00:00
"@tiptap/core": "^2.10.4",
"@tiptap/extension-document": "^2.10.4",
"@tiptap/extension-hard-break": "^2.10.4",
"@tiptap/extension-history": "^2.10.4",
Export Notes to PDF/Word Feature Implementation (#8439) (#9269) Closes #8439 ## Overview This PR implements functionality to export notes/tasks to PDF and Word formats. https://github.com/user-attachments/assets/67eaf4eb-cabc-45ba-8727-13f22ba31067 ## Testing - [x] Verified that the export functionality works for both notes and tasks, whether exporting immediately after opening the editor or after editing. - [x] Ensured the export button appears in the action menu only when the object is a note/task. - [x] Ensured the export button appears in the RightDrawerActionMenuDropdown for a note/task. ## Notes - The code already supports exporting to Word, but only PDF export is currently available. To enable Word export, we just need a UI option allowing users to choose between PDF and Word. - After upgrading the Blocknote packages to the latest version, dependency conflicts arose with tiptap and prosemirror-model. To address this, all tiptap dependencies were consolidated in the root package.json, and a resolution was added for prosemirror-model. Also, some methods in CustomAddBlockItem.tsx were missing in the newer version, so I updated the code to accommodate these changes. - Exporting a note with an image works only if the image is embedded, as Blocknote doesn’t support actual image uploads. Uploaded images are omitted in the PDF export, while the text is retained. --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-30 08:16:44 +00:00
"@tiptap/extension-paragraph": "^2.10.4",
"@tiptap/extension-placeholder": "^2.10.4",
"@tiptap/extension-text": "^2.10.4",
"@tiptap/extension-text-style": "^2.10.4",
"@tiptap/react": "^2.10.4",
"@xyflow/react": "^12.4.2",
"buffer": "^6.0.3",
Export Notes to PDF/Word Feature Implementation (#8439) (#9269) Closes #8439 ## Overview This PR implements functionality to export notes/tasks to PDF and Word formats. https://github.com/user-attachments/assets/67eaf4eb-cabc-45ba-8727-13f22ba31067 ## Testing - [x] Verified that the export functionality works for both notes and tasks, whether exporting immediately after opening the editor or after editing. - [x] Ensured the export button appears in the action menu only when the object is a note/task. - [x] Ensured the export button appears in the RightDrawerActionMenuDropdown for a note/task. ## Notes - The code already supports exporting to Word, but only PDF export is currently available. To enable Word export, we just need a UI option allowing users to choose between PDF and Word. - After upgrading the Blocknote packages to the latest version, dependency conflicts arose with tiptap and prosemirror-model. To address this, all tiptap dependencies were consolidated in the root package.json, and a resolution was added for prosemirror-model. Also, some methods in CustomAddBlockItem.tsx were missing in the newer version, so I updated the code to accommodate these changes. - Exporting a note with an image works only if the image is embedded, as Blocknote doesn’t support actual image uploads. Uploaded images are omitted in the PDF export, while the text is retained. --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-30 08:16:44 +00:00
"docx": "^9.1.0",
"file-saver": "^2.0.5",
"recoil-sync": "^0.2.0",
"transliteration": "^2.3.5",
"twenty-shared": "workspace:*",
"twenty-ui": "workspace:*"
Export Notes to PDF/Word Feature Implementation (#8439) (#9269) Closes #8439 ## Overview This PR implements functionality to export notes/tasks to PDF and Word formats. https://github.com/user-attachments/assets/67eaf4eb-cabc-45ba-8727-13f22ba31067 ## Testing - [x] Verified that the export functionality works for both notes and tasks, whether exporting immediately after opening the editor or after editing. - [x] Ensured the export button appears in the action menu only when the object is a note/task. - [x] Ensured the export button appears in the RightDrawerActionMenuDropdown for a note/task. ## Notes - The code already supports exporting to Word, but only PDF export is currently available. To enable Word export, we just need a UI option allowing users to choose between PDF and Word. - After upgrading the Blocknote packages to the latest version, dependency conflicts arose with tiptap and prosemirror-model. To address this, all tiptap dependencies were consolidated in the root package.json, and a resolution was added for prosemirror-model. Also, some methods in CustomAddBlockItem.tsx were missing in the newer version, so I updated the code to accommodate these changes. - Exporting a note with an image works only if the image is embedded, as Blocknote doesn’t support actual image uploads. Uploaded images are omitted in the PDF export, while the text is retained. --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-30 08:16:44 +00:00
},
"devDependencies": {
"@lingui/cli": "^5.1.2",
"@lingui/swc-plugin": "^5.1.0",
"@lingui/vite-plugin": "^5.1.2",
[FIX] `Out of memory` while running app localy (#11341) # Introduction Lately encountering a lot of out of memory error when running twenty-front in watch mode with both TypeScript and lint checkers ```ts Error: Worker terminated due to reaching memory limit: JS heap out of memory at new NodeError (node:internal/errors:405:5) at [kOnExit] (node:internal/worker:287:26) at Worker.<computed>.onexit (node:internal/worker:209:20) ``` The existing configuration looks like this: ```ts // packages/twenty-front/vite.config.ts 'cd ../.. && eslint packages/twenty-front --report-unused-disable-directives --max-warnings 0 --config .eslintrc.cjs', ``` This is wrong as computing the root eslintrc completely omitting twenty-front's one ***and its ignorePattern*** so will be checking in `node_modules` etc checking for project-structure :). For example this a [snippet](https://gist.github.com/prastoin/d7f8ad4ef5eb2f7732209b756a38094c) of the above commands errors. We can see rule that should be disabled by `eslintrc.react.cjs` extension made from twenty-front `eslintrc` : ```ts /Users/paulrastoin/ws/twenty-two/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/__stories__/SettingsDataModelFieldSettingsFormCard.stories.tsx 23:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion ``` ## Fixes - consume the `twenty-front` package eslint configuration within the vite lint checker - eslint overrides extends are getting merged based on glob inclusion of their files declarations - any linted files should be included in one of our `tsconfig` - removed redundant and counter-productive negative `ignorePatterns`, as eslint will naturally only lint files within configuration file directory by default which will result making it go through local `node_modules` project structure ## Now Less cpu usage <3.5 gb and faster ```ts // from packages/twenty-front TIMING=1 npx eslint . --report-unused-disable-directives --max-warnings 0 --config .eslintrc.cjs --debug #... Rule | Time (ms) | Relative :-----------------------------------------------|----------:|--------: project-structure/folder-structure | 19578.927 | 20.2% prettier/prettier | 13746.156 | 14.2% no-redeclare | 9546.570 | 9.9% @nx/workspace-explicit-boolean-predicates-in-if | 8167.805 | 8.4% @typescript-eslint/no-unused-vars | 6872.803 | 7.1% import/no-relative-packages | 6577.273 | 6.8% @nx/enforce-module-boundaries | 6520.945 | 6.7% import/no-duplicates | 4987.476 | 5.2% react/no-direct-mutation-state | 2323.082 | 2.4% react/require-render-return | 1155.261 | 1.2% ``` ## Conclusion Please note that `nx linter` might not be as strict as vite config eslint runner --------- Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2025-04-02 16:35:00 +00:00
"@types/file-saver": "^2",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/experimental-utils": "^5.62.0",
"@typescript-eslint/parser": "6.21.0",
"@typescript-eslint/utils": "6.21.0",
"eslint": "^8.53.0",
"eslint-config-next": "14.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-lingui": "^0.9.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-project-structure": "^3.9.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-storybook": "^0.6.15",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-unused-imports": "^3.0.0",
"optionator": "^0.9.1"
}
}