fix: fix version handling in pool information
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 3 Jul 2023 21:45:12 +0000 (23:45 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 3 Jul 2023 21:45:12 +0000 (23:45 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
.release-it.json
CHANGELOG.md
rollup.config.mjs
src/pools/abstract-pool.ts
src/pools/version.ts [new file with mode: 0644]

index f9dd74e2121cea562a5c546556c6310d6f3512b5..8e2292859259d6bccdf632127e43757a9f5dec7c 100644 (file)
@@ -14,7 +14,7 @@
   },
   "plugins": {
     "@release-it/bumper": {
-      "out": ["sonar-project.properties"]
+      "out": ["sonar-project.properties", "src/pools/version.ts"]
     },
     "@release-it/keep-a-changelog": {
       "filename": "CHANGELOG.md",
index 7776aee44240e0fc2637d5280a26d540486e54ec..e93a95990d8837b68c7b01c44f42e26bd9362c46 100644 (file)
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+### Fixed
+
+- Brown paper bag release to fix version handling in pool information.
+
 ## [2.6.7] - 2023-07-03
 
 ### Fixed
index d88f9734de2f431f89c2a79ccc5038b88ee17f98..1410f161af83887ede02a8f98eb6bdcec7d35738 100644 (file)
@@ -48,7 +48,6 @@ export default {
     'node:cluster',
     'node:crypto',
     'node:events',
-    'node:fs',
     'node:os',
     'node:perf_hooks',
     'node:worker_threads'
index 03f8c199be642dda1cac20171d0b2410ef73d1c3..796cff1d56c6f85e87f48609c938eaa84535edb7 100644 (file)
@@ -1,6 +1,5 @@
 import crypto from 'node:crypto'
 import { performance } from 'node:perf_hooks'
-import { readFileSync } from 'node:fs'
 import type { MessageValue, PromiseResponseWrapper } from '../utility-types'
 import {
   DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS,
@@ -39,12 +38,7 @@ import {
   type WorkerChoiceStrategyOptions
 } from './selection-strategies/selection-strategies-types'
 import { WorkerChoiceStrategyContext } from './selection-strategies/worker-choice-strategy-context'
-
-const version = (
-  JSON.parse(
-    readFileSync(new URL('../../package.json', import.meta.url), 'utf8')
-  ) as Record<string, unknown>
-).version as string
+import { version } from './version'
 
 /**
  * Base class that implements some shared logic for all poolifier pools.
diff --git a/src/pools/version.ts b/src/pools/version.ts
new file mode 100644 (file)
index 0000000..b19388c
--- /dev/null
@@ -0,0 +1 @@
+export const version = '2.6.7'