Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D/w 17330636 testing 2 #168

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/publish-package-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/verify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ defaults:
shell: bash

jobs:
run_experiment_part_1:
runs-on: macos-latest
outputs:
output-thing: ${{ steps.main.outputs.output_thing }}
steps:
- id: main
run: |
OUTPUT_THING=()
OUTPUT_THING+=('abcd')
OUTPUT_THING+=('bcde')
OUTPUT_THING+=('cdef')
OUTPUT_THING+=('defg')
OUTPUT_THING_STR=$(IFS=' '; echo "${OUTPUT_THING[*]}")
echo "output_thing=$OUTPUT_THING_STR" >> "$GITHUB_OUTPUT"

run_experiment_part_2:
runs-on: macos-latest
needs: run_experiment_part_1
steps:
- uses: actions/checkout@v4
- run: |
LIST_TYPE_VARIABLE=(${{ needs.run_experiment_part_1.outputs.output-thing }})
STRING_TYPE_VARIABLE="${{ needs.run_experiment_part_1.outputs.output-thing }}"
node ./.github/workflows/verify-pr/experiment-script.js "$LIST_TYPE_VARIABLE"
node ./.github/workflows/verify-pr/experiment-script.js "$STRING_TYPE_VARIABLE"
validate_pr_title:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/verify-pr/experiment-script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

function main() {
const inputs = process.argv[2].split(" ");

console.log(`RECEIVED THESE INPUTS: ${JSON.stringify(inputs)}`);
}

main();
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions packages/T-E-M-P-L-A-T-E/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/code-analyzer-core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/code-analyzer-engine-api/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/code-analyzer-eslint-engine/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/code-analyzer-flowtest-engine/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/code-analyzer-pmd-engine/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/code-analyzer-regex-engine/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/code-analyzer-retirejs-engine/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
Loading