@trackunit/iris-app 0.0.488 → 0.0.490
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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.490](https://github.com/Trackunit/manager/compare/iris-app/0.0.489...iris-app/0.0.490) (2024-01-17)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `iris-app-build-utilities` updated to version `0.0.489`
|
|
10
|
+
* `iris-app-api` updated to version `0.0.489`
|
|
11
|
+
* `iris-app-webpack-plugin` updated to version `0.0.489`
|
|
12
|
+
* `test-setup` updated to version `0.0.489`
|
|
13
|
+
## [0.0.489](https://github.com/Trackunit/manager/compare/iris-app/0.0.488...iris-app/0.0.489) (2024-01-17)
|
|
14
|
+
|
|
5
15
|
## [0.0.488](https://github.com/Trackunit/manager/compare/iris-app/0.0.487...iris-app/0.0.488) (2024-01-16)
|
|
6
16
|
|
|
7
17
|
### Dependency Updates
|
package/package.json
CHANGED
|
@@ -16,13 +16,13 @@ const semver = tslib_1.__importStar(require("semver"));
|
|
|
16
16
|
const versionCheck = (pkg, localRange, range, throwError = true) => {
|
|
17
17
|
const localVersion = semver.minVersion(localRange) ?? localRange; // ('^1.0.0') => '1.0.0'
|
|
18
18
|
if (!semver.satisfies(localVersion, range)) {
|
|
19
|
-
const msg = `Package "${pkg}" outdated. Remote Version: ${range} Local version: ${localRange}.
|
|
19
|
+
const msg = `Package "${pkg}" outdated. Remote Version: ${range} Local version: ${localRange}. 👈\n Update package using command: \n npm i ${pkg}@${range}\n ...or to update all trackunit dependencies: \n npx npm-check-updates "/@trackunit/" -u`;
|
|
20
20
|
if (throwError) {
|
|
21
21
|
throw new Error(msg);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
// eslint-disable-next-line no-console
|
|
25
|
-
console.warn("⚠️ " + msg + "
|
|
25
|
+
console.warn("⚠️ " + msg + "\n");
|
|
26
26
|
return true;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkPackageVersion.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app/src/executors/utils/checkPackageVersion.ts"],"names":[],"mappings":";;;;AAAA,uCAA0C;AAC1C,iDAAyC;AACzC,uDAAiC;AACjC,uDAAiC;AAEjC;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,UAAkB,EAAE,KAAa,EAAE,UAAU,GAAG,IAAI,EAAE,EAAE;IAChG,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,CAAC,wBAAwB;IAC1F,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE;QAC1C,MAAM,GAAG,GAAG,YAAY,GAAG,+BAA+B,KAAK,mBAAmB,UAAU,
|
|
1
|
+
{"version":3,"file":"checkPackageVersion.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app/src/executors/utils/checkPackageVersion.ts"],"names":[],"mappings":";;;;AAAA,uCAA0C;AAC1C,iDAAyC;AACzC,uDAAiC;AACjC,uDAAiC;AAEjC;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,UAAkB,EAAE,KAAa,EAAE,UAAU,GAAG,IAAI,EAAE,EAAE;IAChG,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,CAAC,wBAAwB;IAC1F,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE;QAC1C,MAAM,GAAG,GAAG,YAAY,GAAG,+BAA+B,KAAK,mBAAmB,UAAU,kDAAkD,GAAG,I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,GAAG,CAAC,CAAC;YACzD,iHAAiH;YACjH,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;gBAC7C,IAAA,oBAAY,EAAC,GAAG,EAAE,sBAAsB,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;aACtE;SACF;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAZD,wDAYC;AAED,SAAS,YAAY;IACnB,MAAM,gBAAgB,GAAoD,IAAA,qBAAY,EAAC,cAAc,CAAC,CAAC;IACvG,MAAM,qBAAqB,GAAG,MAAM,CAAC,WAAW,CAC9C,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAC/F,CAAC;IACF,MAAM,wBAAwB,GAAG,MAAM,CAAC,WAAW,CACjD,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAClG,CAAC;IACF,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAC;AAC7D,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,mBAAmB,CAAC,UAAU,GAAG,IAAI;IACzD,MAAM,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,GAAG,YAAY,EAAE,CAAC;IAC3E,qDAAqD;IACrD,sDAAsD;IACtD,MAAM,sBAAsB,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;IAChE,MAAM,sBAAsB,CAAC,wBAAwB,EAAE,UAAU,CAAC,CAAC;IACnE,OAAO,IAAI,CAAC;AACd,CAAC;AAPD,kDAOC","sourcesContent":["import { readJsonFile } from \"@nx/devkit\";\nimport { execSync } from \"child_process\";\nimport * as pacote from \"pacote\";\nimport * as semver from \"semver\";\n\n/**\n *\n * @param pkg package to look for.\n * @param localRange local version of the package.\n * @param range range\n * @returns { boolean } true if its a valid version\n */\nexport const versionCheck = (pkg: string, localRange: string, range: string, throwError = true) => {\n const localVersion = semver.minVersion(localRange) ?? localRange; // ('^1.0.0') => '1.0.0'\n if (!semver.satisfies(localVersion, range)) {\n const msg = `Package \"${pkg}\" outdated. Remote Version: ${range} Local version: ${localRange}. 👈\\n Update package using command: \\n npm i ${pkg}@${range}\\n ...or to update all trackunit dependencies: \\n npx npm-check-updates \"/@trackunit/\" -u`;\n if (throwError) {\n throw new Error(msg);\n } else {\n // eslint-disable-next-line no-console\n console.warn(\"⚠️ \" + msg + \"\\n\");\n return true;\n }\n }\n return true;\n};\n\n/**\n * Get the latest version of the package from the registry.\n *\n * @param pkg package to look for.\n * @returns { Promise<string> } returns version\n */\nexport const getLatestRemoteVersion = async (pkg: string) => {\n try {\n const manifest = await pacote.manifest(pkg);\n return manifest.version;\n } catch (error) {\n throw new Error(\n `Error fetching manifest for package ${pkg}. This package might need to be published, or it has been included as a dependency by mistake.`\n );\n }\n};\n\n/**\n * Check if the current version of the package is the same as the one in the manager.\n *\n * @param {string} managerNxVersion version of nx in the manager\n * @returns { boolean} true if its a valid version\n */\nexport async function checkNxVersion(managerNxVersion: string, throwError = true) {\n const currentNxVersion = execSync(\"nx --version\")\n .toString(\"utf-8\")\n .replace(/\\r?\\n|\\r/, \"\"); // regex removes any line breaks\n return versionCheck(\"nx\", currentNxVersion, managerNxVersion, throwError);\n}\n\n/**\n *\n */\nexport async function checkTrackunitPackages(dependencies: Record<string, string>, throwError = true) {\n for (const key in dependencies) {\n const remoteVersion: string | undefined = await getLatestRemoteVersion(key);\n if (remoteVersion) {\n const localDependencyVersion: string = dependencies[key];\n // If @trackunit dependencies are linked/added locally using \"file:\", skip the version check, used for E2E tests.\n if (!localDependencyVersion.includes(\"file:\")) {\n versionCheck(key, localDependencyVersion, remoteVersion, throwError);\n }\n }\n }\n return true;\n}\n\nfunction getLibraries() {\n const packageJsonLocal: Record<string, string | Record<string, string>> = readJsonFile(\"package.json\");\n const trackunitDependencies = Object.fromEntries(\n Object.entries(packageJsonLocal.dependencies).filter(([key]) => key.startsWith(\"@trackunit/\"))\n );\n const trackunitDevDependencies = Object.fromEntries(\n Object.entries(packageJsonLocal.devDependencies).filter(([key]) => key.startsWith(\"@trackunit/\"))\n );\n return { trackunitDependencies, trackunitDevDependencies };\n}\n\n/**\n *\n */\nexport async function checkPackageVersion(throwError = true) {\n const { trackunitDependencies, trackunitDevDependencies } = getLibraries();\n // const managerNxVersion = version.managerNxVersion;\n // await checkNxVersion(managerNxVersion, throwError);\n await checkTrackunitPackages(trackunitDependencies, throwError);\n await checkTrackunitPackages(trackunitDevDependencies, throwError);\n return true;\n}\n"]}
|