diff --git a/.github/workflows/publish-package-to-npm.yml b/.github/workflows/publish-package-to-npm.yml index 0047a0e9..dff98248 100644 --- a/.github/workflows/publish-package-to-npm.yml +++ b/.github/workflows/publish-package-to-npm.yml @@ -111,15 +111,15 @@ jobs: echo "branch_name=release/$NOW_TIMESTAMP" >> "$GITHUB_OUTPUT" - name: Strip '-SNAPSHOT' from to-be-released package versions run: | - PACKAGE_LIST=(${{ needs.validate-packages-as-releasable.outputs.packages-to-release }}) - node ./.github/workflows/publish-package-to-npm/update-versions-in-released-packages.js "$PACKAGE_LIST" + PACKAGE_NAMES_STRING="${{ needs.validate-packages-as-releasable.outputs.packages-to-release }}" + node ./.github/workflows/publish-package-to-npm/update-versions-in-released-packages.js "$PACKAGE_NAMES_STRING" - name: Update inter-package dependencies run: | - RELEASABLE_PACKAGES=(${{ needs.validate-packages-as-releasable.outputs.packages-to-release }}) + PACKAGES_TO_RELEASE_STRING="${{ needs.validate-packages-as-releasable.outputs.packages-to-release }}" cd packages ALL_PACKAGES=`ls` cd .. - node ./.github/workflows/publish-package-to-npm/update-dependencies-on-released-packages.js "$RELEASABLE_PACKAGES" "$ALL_PACKAGES" + node ./.github/workflows/publish-package-to-npm/update-dependencies-on-released-packages.js "$PACKAGES_TO_RELEASE_STRING" "$ALL_PACKAGES" - name: Build run: | npm install @@ -228,7 +228,7 @@ jobs: # We need the NPM token to publish. echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc PUBLISHED_VERSION=$(jq -r ".version" package.json) - if [ "${{ inputs.dryrun }}" == "true" ]]; then + if [[ "${{ inputs.dryrun }}" == "true" ]]; then npm publish --tag latest-alpha --access public --verbose --dry-run echo "Fake-published ${PACKAGE_NAME}@${PUBLISHED_VERSION}" else diff --git a/.github/workflows/publish-package-to-npm/update-dependencies-on-released-packages.js b/.github/workflows/publish-package-to-npm/update-dependencies-on-released-packages.js index ba4cab58..ce34add9 100644 --- a/.github/workflows/publish-package-to-npm/update-dependencies-on-released-packages.js +++ b/.github/workflows/publish-package-to-npm/update-dependencies-on-released-packages.js @@ -3,8 +3,26 @@ const fs = require('fs'); function main() { const packagesToRelease = process.argv[2].split(" "); + + console.log('====== RUNNING update-dependencies-on-released-packages.js ======='); + if (packagesToRelease.length > 0) { + displayList('THESE PACKAGES ARE BEING RELEASED:', packagesToRelease); + } else { + console.log('NO PACKAGES ARE BEING RELEASED. THAT SEEMS INCORRECT.'); + // If we received no package names, that indicates problem in the release process. + process.exit(1); + } + + // Split on `\n` instead of ` ` because this argument comes from $(ls). const allPackages = process.argv[3].split("\n"); + if (allPackages.length > 0) { + displayList('WILL CHECK DEPENDENCIES IN THESE PACKAGES:', allPackages); + } else { + console.log('NO PACKAGES TO CHECK FOR DEPENDENCIES. THAT SEEMS INCORRECT.'); + process.exit(1); + } + const packageJsonsToRelease = getPackageJsons(packagesToRelease); const allPackageJsons = getPackageJsons(allPackages); @@ -20,15 +38,19 @@ function main() { function displayMapOfLists(header, mapOfLists) { console.log(header); for (const [key, innerList] of mapOfLists.entries()) { - console.log(`IN ${key}:`); - for (const innerListItem of innerList) { - console.log(`* ${innerListItem}`); - } - console.log(''); + displayList(`IN ${key}:`, innerList); } console.log('\n'); } +function displayList(header, list) { + console.log(header); + for (const item of list) { + console.log(`* ${listItem}`); + } + console.log(''); +} + function getPackageJsons(packageNames) { return packageNames.map(getPackageJson); } diff --git a/.github/workflows/publish-package-to-npm/update-versions-in-released-packages.js b/.github/workflows/publish-package-to-npm/update-versions-in-released-packages.js index dce241a0..dca5f107 100644 --- a/.github/workflows/publish-package-to-npm/update-versions-in-released-packages.js +++ b/.github/workflows/publish-package-to-npm/update-versions-in-released-packages.js @@ -4,6 +4,15 @@ const fs = require('fs'); function main() { const packagesToRelease = process.argv[2].split(" "); + console.log('====== RUNNING update-versions-in-released-packages.js ======='); + if (packagesToRelease.length > 0) { + displayList('RECEIVED THE FOLLOWING PACKAGE NAMES:', packagesToRelease); + } else { + console.log('RECEIVED NO PACKAGE NAMES'); + // If we received no package names, that indicates problem in the release process. + process.exit(1); + } + const packageJsonsToRelease = getPackageJsons(packagesToRelease); const packageChangesMade = updatePackageVersionsAndDescribeChanges(packageJsonsToRelease); diff --git a/.github/workflows/publish-package-to-npm/validate-packages-as-releasable.js b/.github/workflows/publish-package-to-npm/validate-packages-as-releasable.js index 4ae29025..23f900b2 100644 --- a/.github/workflows/publish-package-to-npm/validate-packages-as-releasable.js +++ b/.github/workflows/publish-package-to-npm/validate-packages-as-releasable.js @@ -4,6 +4,7 @@ const fs = require('fs'); function main() { const packagesToRelease = process.argv[2].split(' '); + console.log('====== RUNNING validate-packages-as-releasable.js ======='); if (packagesToRelease.length === 0) { console.log('Error: No packages selected for release'); process.exit(1); diff --git a/.github/workflows/verify-pr/validate-package-interdependencies.js b/.github/workflows/verify-pr/validate-package-interdependencies.js index faf7c1cb..ff7cdab7 100644 --- a/.github/workflows/verify-pr/validate-package-interdependencies.js +++ b/.github/workflows/verify-pr/validate-package-interdependencies.js @@ -4,6 +4,13 @@ const fs = require('fs'); function main() { const packageNames = process.argv[2].split('\n'); + if (packageNames.length > 0) { + displayList('WILL ATTEMPT TO VALIDATE THESE PACKAGES:', packageNames); + } else { + console.log('NO PACKAGES PROVIDED FOR VALIDATION'); + process.exit(0); + } + const packageJsons = getAllPackageJsons(packageNames); const incorrectPackageInterdependencies = identifyIncorrectlyInterdependentPackages(packageJsons); diff --git a/packages/T-E-M-P-L-A-T-E/package.json b/packages/T-E-M-P-L-A-T-E/package.json index b22ea742..7d98f64e 100644 --- a/packages/T-E-M-P-L-A-T-E/package.json +++ b/packages/T-E-M-P-L-A-T-E/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/t-e-m-p-l-a-t-e", "description": "T-E-M-P-L-A-T-E", - "version": "0.16.0-SNAPSHOT", + "version": "0.16.1-SNAPSHOT", "author": "The Salesforce Code Analyzer Team", "license": "BSD-3-Clause", "homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview", @@ -14,7 +14,7 @@ "types": "dist/index.d.ts", "dependencies": { "@types/node": "^20.0.0", - "@salesforce/code-analyzer-engine-api": "0.16.0-SNAPSHOT" + "@salesforce/code-analyzer-engine-api": "0.16.1-SNAPSHOT" }, "devDependencies": { "@eslint/js": "^8.57.1", diff --git a/packages/code-analyzer-core/package.json b/packages/code-analyzer-core/package.json index a2278993..830efc71 100644 --- a/packages/code-analyzer-core/package.json +++ b/packages/code-analyzer-core/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/code-analyzer-core", "description": "Core Package for the Salesforce Code Analyzer", - "version": "0.19.0-SNAPSHOT", + "version": "0.19.1-SNAPSHOT", "author": "The Salesforce Code Analyzer Team", "license": "BSD-3-Clause", "homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview", @@ -13,7 +13,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "dependencies": { - "@salesforce/code-analyzer-engine-api": "0.16.0-SNAPSHOT", + "@salesforce/code-analyzer-engine-api": "0.16.1-SNAPSHOT", "@types/js-yaml": "^4.0.9", "@types/node": "^20.0.0", "@types/sarif": "^2.1.7", diff --git a/packages/code-analyzer-engine-api/package.json b/packages/code-analyzer-engine-api/package.json index 0bcb8693..7455edf4 100644 --- a/packages/code-analyzer-engine-api/package.json +++ b/packages/code-analyzer-engine-api/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/code-analyzer-engine-api", "description": "Engine API Package for the Salesforce Code Analyzer", - "version": "0.16.0-SNAPSHOT", + "version": "0.16.1-SNAPSHOT", "author": "The Salesforce Code Analyzer Team", "license": "BSD-3-Clause", "homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview", diff --git a/packages/code-analyzer-eslint-engine/package.json b/packages/code-analyzer-eslint-engine/package.json index b74b25bd..b1f63e7c 100644 --- a/packages/code-analyzer-eslint-engine/package.json +++ b/packages/code-analyzer-eslint-engine/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/code-analyzer-eslint-engine", "description": "Plugin package that adds 'eslint' as an engine into Salesforce Code Analyzer", - "version": "0.16.0-SNAPSHOT", + "version": "0.16.1-SNAPSHOT", "author": "The Salesforce Code Analyzer Team", "license": "BSD-3-Clause", "homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview", @@ -17,7 +17,7 @@ "@babel/eslint-parser": "^7.25.9", "@eslint/js": "^8.57.1", "@lwc/eslint-plugin-lwc": "^1.8.2", - "@salesforce/code-analyzer-engine-api": "0.16.0-SNAPSHOT", + "@salesforce/code-analyzer-engine-api": "0.16.1-SNAPSHOT", "@salesforce/eslint-config-lwc": "^3.6.0", "@salesforce/eslint-plugin-lightning": "^1.0.0", "@types/eslint": "^8.56.10", diff --git a/packages/code-analyzer-flowtest-engine/package.json b/packages/code-analyzer-flowtest-engine/package.json index 6af26a99..b44aeb51 100644 --- a/packages/code-analyzer-flowtest-engine/package.json +++ b/packages/code-analyzer-flowtest-engine/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/code-analyzer-flowtest-engine", "description": "Plugin package that adds 'flowtest' as an engine into Salesforce Code Analyzer", - "version": "0.16.0-SNAPSHOT", + "version": "0.16.1-SNAPSHOT", "author": "The Salesforce Code Analyzer Team", "license": "BSD-3-Clause", "homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview", @@ -13,7 +13,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "dependencies": { - "@salesforce/code-analyzer-engine-api": "0.16.0-SNAPSHOT", + "@salesforce/code-analyzer-engine-api": "0.16.1-SNAPSHOT", "@types/node": "^20.0.0", "@types/semver": "^7.5.8", "@types/tmp": "^0.2.6", diff --git a/packages/code-analyzer-pmd-engine/package.json b/packages/code-analyzer-pmd-engine/package.json index fe061551..b3a99ea1 100644 --- a/packages/code-analyzer-pmd-engine/package.json +++ b/packages/code-analyzer-pmd-engine/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/code-analyzer-pmd-engine", "description": "Plugin package that adds 'pmd' and 'cpd' as engines into Salesforce Code Analyzer", - "version": "0.16.0-SNAPSHOT", + "version": "0.16.1-SNAPSHOT", "author": "The Salesforce Code Analyzer Team", "license": "BSD-3-Clause", "homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview", @@ -14,7 +14,7 @@ "types": "dist/index.d.ts", "dependencies": { "@types/node": "^20.0.0", - "@salesforce/code-analyzer-engine-api": "0.16.0-SNAPSHOT", + "@salesforce/code-analyzer-engine-api": "0.16.1-SNAPSHOT", "@types/tmp": "^0.2.6", "tmp": "^0.2.3", "@types/semver": "^7.5.8", diff --git a/packages/code-analyzer-regex-engine/package.json b/packages/code-analyzer-regex-engine/package.json index be74007d..c9288aae 100644 --- a/packages/code-analyzer-regex-engine/package.json +++ b/packages/code-analyzer-regex-engine/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/code-analyzer-regex-engine", "description": "Plugin package that adds 'regex' as an engine into Salesforce Code Analyzer", - "version": "0.16.0-SNAPSHOT", + "version": "0.16.1-SNAPSHOT", "author": "The Salesforce Code Analyzer Team", "license": "BSD-3-Clause", "homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview", @@ -13,7 +13,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "dependencies": { - "@salesforce/code-analyzer-engine-api": "0.16.0-SNAPSHOT", + "@salesforce/code-analyzer-engine-api": "0.16.1-SNAPSHOT", "@types/node": "^20.0.0", "isbinaryfile": "^5.0.4" }, diff --git a/packages/code-analyzer-retirejs-engine/package.json b/packages/code-analyzer-retirejs-engine/package.json index b0ae555d..b6df1e00 100644 --- a/packages/code-analyzer-retirejs-engine/package.json +++ b/packages/code-analyzer-retirejs-engine/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/code-analyzer-retirejs-engine", "description": "Plugin package that adds 'retire-js' as an engine into Salesforce Code Analyzer", - "version": "0.16.0-SNAPSHOT", + "version": "0.16.1-SNAPSHOT", "author": "The Salesforce Code Analyzer Team", "license": "BSD-3-Clause", "homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview", @@ -13,7 +13,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "dependencies": { - "@salesforce/code-analyzer-engine-api": "0.16.0-SNAPSHOT", + "@salesforce/code-analyzer-engine-api": "0.16.1-SNAPSHOT", "@types/node": "^20.0.0", "@types/tmp": "^0.2.6", "isbinaryfile": "^5.0.4",