[CHORE] Remove preconstruct local patch (#11153)

# Introduction
Please find related parent PR
https://github.com/twentyhq/twenty/pull/11083

Custom TypeScript configuration file should be available on "2.8.12" !
See related changeset version dump PR
https://github.com/preconstruct/preconstruct/pull/619
This commit is contained in:
Paul Rastoin
2025-03-27 18:19:46 +01:00
committed by GitHub
parent c19f6c3479
commit 226b8f1b00
5 changed files with 9 additions and 79 deletions

View File

@ -13,7 +13,6 @@ COPY ./packages/twenty-server/package.json /app/packages/twenty-server/
COPY ./packages/twenty-server/patches /app/packages/twenty-server/patches
COPY ./packages/twenty-ui/package.json /app/packages/twenty-ui/
COPY ./packages/twenty-shared/package.json /app/packages/twenty-shared/
COPY ./packages/twenty-shared/patches /app/packages/twenty-shared/patches
COPY ./packages/twenty-front/package.json /app/packages/twenty-front/
# Install all dependencies

View File

@ -14,7 +14,7 @@
},
"devDependencies": {
"@babel/preset-env": "^7.26.9",
"@preconstruct/cli": "patch:@preconstruct/cli@npm%3A2.8.11#./patches/@preconstruct-cli-npm-2.8.11-030abfa6ae.patch",
"@preconstruct/cli": "^2.8.12",
"@prettier/sync": "^0.5.2",
"@types/babel__preset-env": "^7",
"babel-plugin-module-resolver": "^5.0.2",
@ -26,6 +26,7 @@
"zod": "3.23.8"
},
"preconstruct": {
"tsconfig": "tsconfig.lib.json",
"entrypoints": [
"./index.ts",
"./constants/index.ts",

View File

@ -1,26 +0,0 @@
diff --git a/cli/dist/preconstruct-cli-cli.cjs.js b/cli/dist/preconstruct-cli-cli.cjs.js
index 8fbd4efc8ee4d98bc72d16344ff6f6ab4e5e2736..cf451d99128fd06053426d1a265f4e305380dd7b 100644
--- a/cli/dist/preconstruct-cli-cli.cjs.js
+++ b/cli/dist/preconstruct-cli-cli.cjs.js
@@ -1509,7 +1509,7 @@ let memoizedGetProgram = weakMemoize(typescript => memoize(async configFileName
return nonMemoizedGetProgram(typescript, configFileName);
}));
async function getProgram(dirname, pkgName, ts) {
- let configFileName = ts.findConfigFile(dirname, ts.sys.fileExists);
+ let configFileName = ts.findConfigFile(dirname, ts.sys.fileExists, 'tsconfig.lib.json');
if (!configFileName) {
throw new FatalError("an entrypoint source file ends with the .ts or tsx extension but no TypeScript config exists, please create one.", pkgName);
}
diff --git a/cli/dist/preconstruct-cli-cli.esm.js b/cli/dist/preconstruct-cli-cli.esm.js
index 0045392b46c8928753af564f67681886e0f15bed..164a9bfbae85f1a8f41fffc87c6a3c4014cb9d33 100644
--- a/cli/dist/preconstruct-cli-cli.esm.js
+++ b/cli/dist/preconstruct-cli-cli.esm.js
@@ -1460,7 +1460,7 @@ let memoizedGetProgram = weakMemoize(typescript => memoize(async configFileName
return nonMemoizedGetProgram(typescript, configFileName);
}));
async function getProgram(dirname, pkgName, ts) {
- let configFileName = ts.findConfigFile(dirname, ts.sys.fileExists);
+ let configFileName = ts.findConfigFile(dirname, ts.sys.fileExists, 'tsconfig.lib.json');
if (!configFileName) {
throw new FatalError("an entrypoint source file ends with the .ts or tsx extension but no TypeScript config exists, please create one.", pkgName);
}

View File

@ -194,6 +194,8 @@ const computePackageJsonFilesAndPreconstructConfig = (
return {
preconstruct: {
// TODO refactor to merge in existing configuration
tsconfig: 'tsconfig.lib.json',
entrypoints: [
'./index.ts',
...entrypoints.map((module) => `./${module}/index.ts`),

View File

@ -12543,9 +12543,9 @@ __metadata:
languageName: node
linkType: hard
"@preconstruct/cli@npm:2.8.11":
version: 2.8.11
resolution: "@preconstruct/cli@npm:2.8.11"
"@preconstruct/cli@npm:^2.8.12":
version: 2.8.12
resolution: "@preconstruct/cli@npm:2.8.12"
dependencies:
"@babel/code-frame": "npm:^7.5.5"
"@babel/core": "npm:^7.7.7"
@ -12585,53 +12585,7 @@ __metadata:
zod: "npm:^3.21.4"
bin:
preconstruct: bin.js
checksum: 10c0/8f79bc789e0eae239c1a622c93928bed86bad6f994a9eeeacd9e8c7da4e06865fb465b1c57cf1f64cbc84b2a8e5c957e2fcd4feea0f1d37d1c0dd156852fd7a8
languageName: node
linkType: hard
"@preconstruct/cli@patch:@preconstruct/cli@npm%3A2.8.11#./patches/@preconstruct-cli-npm-2.8.11-030abfa6ae.patch::locator=twenty-shared%40workspace%3Apackages%2Ftwenty-shared":
version: 2.8.11
resolution: "@preconstruct/cli@patch:@preconstruct/cli@npm%3A2.8.11#./patches/@preconstruct-cli-npm-2.8.11-030abfa6ae.patch::version=2.8.11&hash=976544&locator=twenty-shared%40workspace%3Apackages%2Ftwenty-shared"
dependencies:
"@babel/code-frame": "npm:^7.5.5"
"@babel/core": "npm:^7.7.7"
"@babel/helper-module-imports": "npm:^7.10.4"
"@babel/runtime": "npm:^7.7.7"
"@preconstruct/hook": "npm:^0.4.0"
"@rollup/plugin-alias": "npm:^3.1.1"
"@rollup/plugin-commonjs": "npm:^15.0.0"
"@rollup/plugin-json": "npm:^4.1.0"
"@rollup/plugin-node-resolve": "npm:^11.2.1"
"@rollup/plugin-replace": "npm:^2.4.1"
builtin-modules: "npm:^3.1.0"
chalk: "npm:^4.1.0"
ci-info: "npm:^3.8.0"
dataloader: "npm:^2.0.0"
detect-indent: "npm:^6.0.0"
enquirer: "npm:^2.3.6"
estree-walker: "npm:^2.0.1"
fast-deep-equal: "npm:^2.0.1"
fast-glob: "npm:^3.2.4"
fs-extra: "npm:^9.0.1"
is-reference: "npm:^1.2.1"
jest-worker: "npm:^26.3.0"
magic-string: "npm:^0.30.0"
ms: "npm:^2.1.2"
normalize-path: "npm:^3.0.0"
npm-packlist: "npm:^2.1.2"
p-limit: "npm:^3.0.2"
parse-glob: "npm:^3.0.4"
parse-json: "npm:^5.1.0"
quick-lru: "npm:^5.1.1"
resolve-from: "npm:^5.0.0"
rollup: "npm:^2.79.1"
semver: "npm:^7.3.4"
terser: "npm:^5.16.8"
v8-compile-cache: "npm:^2.1.1"
zod: "npm:^3.21.4"
bin:
preconstruct: bin.js
checksum: 10c0/7b8c885057f2ec0a6fce5f91f3a8c13ec5d685707d52238199dabe538cd1c405df8333bca2d30899e57e1e3d8cfe451aa4067bb61d6a8c1069afbb544540cb6d
checksum: 10c0/775d9df65c1ab03b80a4e78337393c659244190b0a1671444f0de5a2b59f006a1b591065eee2f8a0b0b1db494117ab0720815c714765bd2d7df7e1f9f89f3622
languageName: node
linkType: hard
@ -53126,7 +53080,7 @@ __metadata:
resolution: "twenty-shared@workspace:packages/twenty-shared"
dependencies:
"@babel/preset-env": "npm:^7.26.9"
"@preconstruct/cli": "patch:@preconstruct/cli@npm%3A2.8.11#./patches/@preconstruct-cli-npm-2.8.11-030abfa6ae.patch"
"@preconstruct/cli": "npm:^2.8.12"
"@prettier/sync": "npm:^0.5.2"
"@sniptt/guards": "npm:^0.2.0"
"@types/babel__preset-env": "npm:^7"