From e1ede409be981be30f190b987509cb3edf37d2a9 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Thu, 19 Sep 2024 14:22:57 +0900 Subject: [PATCH] Fix #1277: disable `preserveModules` of `rollup` configuration. --- benchmark/package.json | 2 +- errors/package.json | 2 +- package.json | 2 +- rollup.config.js | 16 ++++++++++------ test-esm/package.json | 2 +- test/package.json | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/benchmark/package.json b/benchmark/package.json index 6c29e6e880..1dc0d642ed 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -72,6 +72,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.10.1-dev.20240919.tgz" + "typia": "../typia-6.10.1-dev.20240920.tgz" } } \ No newline at end of file diff --git a/errors/package.json b/errors/package.json index 076000a834..312b2c1259 100644 --- a/errors/package.json +++ b/errors/package.json @@ -32,6 +32,6 @@ "typescript": "^5.3.2" }, "dependencies": { - "typia": "../typia-6.10.1-dev.20240919.tgz" + "typia": "../typia-6.10.1-dev.20240920.tgz" } } \ No newline at end of file diff --git a/package.json b/package.json index ee6a409034..d1025668bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typia", - "version": "6.10.1-dev.20240919", + "version": "6.10.1-dev.20240920", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/rollup.config.js b/rollup.config.js index d0865dd097..dccfac556c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -10,23 +10,27 @@ module.exports = { format: "esm", sourcemap: true, entryFileNames: (chunkInfo) => { - const ext = `mjs` + const ext = `mjs`; const externalDir = `_external`; const nodeModulesDir = `node_modules`; if (chunkInfo.name.includes(nodeModulesDir)) { /** replace / to _ and the last part of the path is the file name */ - const nameSplit = chunkInfo.name.split('/') - const chunkName = path.join(externalDir, nameSplit.slice(0, -1).join('_'), nameSplit.at(-1)) + const nameSplit = chunkInfo.name.split("/"); + const chunkName = path.join( + externalDir, + nameSplit.slice(0, -1).join("_"), + nameSplit.at(-1), + ); console.table({ before: chunkInfo.name, after: chunkName, - }) + }); return `${chunkName}.${ext}`; } return `[name].${ext}`; }, - preserveModules: true, - preserveModulesRoot: "src", + // preserveModules: true, + // preserveModulesRoot: "src", }, plugins: [ nodeResolve(), diff --git a/test-esm/package.json b/test-esm/package.json index 38ddd72a69..7ffbfe8d1f 100644 --- a/test-esm/package.json +++ b/test-esm/package.json @@ -36,6 +36,6 @@ "typescript": "^5.4.5" }, "dependencies": { - "typia": "../typia-6.10.1-dev.20240919.tgz" + "typia": "../typia-6.10.1-dev.20240920.tgz" } } \ No newline at end of file diff --git a/test/package.json b/test/package.json index 5441cd5205..4697b1c254 100644 --- a/test/package.json +++ b/test/package.json @@ -52,6 +52,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.10.1-dev.20240919.tgz" + "typia": "../typia-6.10.1-dev.20240920.tgz" } } \ No newline at end of file