enablement-build-monorepo-version 8.3.1 → 8.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.mjs +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enablement-build-monorepo-version",
3
- "version": "8.3.1",
3
+ "version": "8.3.2",
4
4
  "description": "This detects changes in the children packages of a monorepo.",
5
5
  "type": "module",
6
6
  "module": "./src/index.mjs",
package/src/index.mjs CHANGED
@@ -3,6 +3,11 @@ import path from 'path';
3
3
  import { readFileSync, writeFileSync, existsSync, lstatSync } from "fs";
4
4
  import { exec } from "child_process";
5
5
 
6
+ const packageMetadata = JSON.parse(
7
+ readFileSync(new URL("../package.json", import.meta.url), "utf8"),
8
+ );
9
+ const packageVersion = packageMetadata.version;
10
+
6
11
  import { dependencyMap, compare, getCurrentVersion, updateVersion, retagToPackageNames, detectOldFormatTags, resolveWorkspaceChildren, excludeChildren, applyInitScripts, RELEASE_SCRIPTS, emitVariable, hashElement, resolveHashFilePath, ensureHashFileExists, loadHashFile, writeHashFile } from "./lib.mjs";
7
12
 
8
13
 
@@ -391,6 +396,7 @@ async function initPackage(options) {
391
396
 
392
397
  (async () => {
393
398
  try {
399
+ console.log(`enablement-build-monorepo-version v${packageVersion}`);
394
400
  if (options.init) {
395
401
  await initPackage(options);
396
402
  return;