Skip to content

Commit

Permalink
chore: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Oct 31, 2023
2 parents 02f4423 + ad3793a commit 236ed9f
Show file tree
Hide file tree
Showing 72 changed files with 516 additions and 460 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"dependencies": {
"@oclif/core": "^2.15.0",
"@salesforce/apex-node": "^2.1.0",
"@salesforce/core": "^5.3.9",
"@salesforce/kit": "^3.0.13",
"@salesforce/core": "^5.3.16",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^3.1.22",
"@salesforce/source-deploy-retrieve": "^9.7.27",
"@salesforce/source-tracking": "^4.2.17",
"@salesforce/source-deploy-retrieve": "^9.8.1",
"@salesforce/source-tracking": "^4.2.20",
"chalk": "^4.1.2",
"shelljs": "^0.8.5",
"tslib": "^2"
Expand All @@ -20,7 +20,7 @@
"@oclif/plugin-command-snapshot": "^4.0.12",
"@salesforce/cli-plugins-testkit": "^4.4.7",
"@salesforce/dev-config": "^4.0.1",
"@salesforce/dev-scripts": "^5.11.0",
"@salesforce/dev-scripts": "^5.12.2",
"@salesforce/plugin-command-reference": "^3.0.40",
"@salesforce/plugin-settings": "^1.4.27",
"@salesforce/plugin-source": "^2.10.30",
Expand All @@ -34,16 +34,16 @@
"@types/shelljs": "^0.8.13",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.8",
"chai": "^4.3.10",
"cross-env": "^7.0.3",
"eslint": "^8.52.0",
"eslint-config-prettier": "^8.10.0",
"eslint-config-salesforce": "^2.0.1",
"eslint-config-salesforce-license": "^0.2.0",
"eslint-config-salesforce-typescript": "^1.1.1",
"eslint-config-salesforce-typescript": "^2.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-jsdoc": "^43.0.5",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-sf-plugin": "^1.16.7",
"husky": "^7.0.4",
"jsforce": "^2.0.0-beta.28",
Expand All @@ -55,8 +55,8 @@
"shx": "0.3.4",
"sinon": "11.1.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"wireit": "^0.14.0"
"typescript": "^5.2.2",
"wireit": "^0.14.1"
},
"config": {},
"engines": {
Expand Down
3 changes: 3 additions & 0 deletions schemas/hooks/sf-deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
"releaseNotesUrl": {
"type": "string"
},
"scopeProfiles": {
"type": "boolean"
},
"uninstallScript": {
"type": "string"
},
Expand Down
2 changes: 1 addition & 1 deletion src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
/* eslint-disable class-methods-use-this */

import { EOL } from 'os';
import { EOL } from 'node:os';
import { writeFile, readFile } from 'node:fs/promises';
import { existsSync } from 'node:fs';
import { Hook } from '@oclif/core';
Expand Down
4 changes: 2 additions & 2 deletions src/commands/project/convert/mdapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { dirname, resolve } from 'path';
import * as fs from 'fs';
import { dirname, resolve } from 'node:path';
import * as fs from 'node:fs';
import { Messages, SfError } from '@salesforce/core';
import {
ComponentSet,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/project/convert/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { resolve } from 'path';
import * as fs from 'fs';
import { resolve } from 'node:path';
import * as fs from 'node:fs';

import { Messages } from '@salesforce/core';
import {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/project/delete/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
import * as fs from 'node:fs';
import * as path from 'node:path';
import * as os from 'node:os';
import { Interfaces } from '@oclif/core';
import { Lifecycle, Messages, Org, SfError } from '@salesforce/core';
import {
Expand Down
7 changes: 6 additions & 1 deletion src/commands/project/deploy/cancel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ export default class DeployMetadataCancel extends SfCommand<DeployResultJson> {
protected catch(error: SfCommand.Error): Promise<SfCommand.Error> {
if (error.name.includes('INVALID_ID_FIELD')) {
const err = messages.createError('error.CannotCancelDeploy');
return super.catch({ ...error, name: err.name, message: err.message, code: err.code });
return super.catch({
...error,
name: err.name,
message: err.message,
...(typeof err.code === 'string' || typeof err.code === 'number' ? { code: err.code } : {}),
});
}
return super.catch(error);
}
Expand Down
7 changes: 6 additions & 1 deletion src/commands/project/deploy/quick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ export default class DeployMetadataQuick extends SfCommand<DeployResultJson> {
protected catch(error: SfCommand.Error): Promise<SfCommand.Error> {
if (error.name.includes('INVALID_ID_FIELD')) {
const err = messages.createError('error.CannotQuickDeploy');
return super.catch({ ...error, name: err.name, message: err.message, code: err.code });
return super.catch({
...error,
name: err.name,
message: err.message,
...(typeof err.code === 'string' || typeof err.code === 'number' ? { code: err.code } : {}),
});
}
return super.catch(error);
}
Expand Down
7 changes: 6 additions & 1 deletion src/commands/project/deploy/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,12 @@ export default class DeployMetadata extends SfCommand<DeployResultJson> {
}
if (error.message.includes('client has timed out')) {
const err = messages.createError('error.ClientTimeout', [this.config.bin]);
return super.catch({ ...error, name: err.name, message: err.message, code: err.code });
return super.catch({
...error,
name: err.name,
message: err.message,
...(typeof err.code === 'string' || typeof err.code === 'number' ? { code: err.code } : {}),
});
}
return super.catch(error);
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/project/deploy/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as os from 'os';
import * as os from 'node:os';
import { bold } from 'chalk';
import { EnvironmentVariable, Lifecycle, Messages, OrgConfigProperties, SfError } from '@salesforce/core';
import { CodeCoverageWarnings, DeployVersionData, RequestStatus } from '@salesforce/source-deploy-retrieve';
Expand Down
4 changes: 2 additions & 2 deletions src/commands/project/generate/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { join } from 'path';
import * as fs from 'fs';
import { join } from 'node:path';
import * as fs from 'node:fs';
import { Messages, Org } from '@salesforce/core';
import { ComponentSetBuilder } from '@salesforce/source-deploy-retrieve';
import {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/project/list/ignored.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import * as fs from 'fs';
import * as path from 'node:path';
import * as fs from 'node:fs';
import { Messages, SfError } from '@salesforce/core';
import { ForceIgnore } from '@salesforce/source-deploy-retrieve';
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
Expand Down
6 changes: 3 additions & 3 deletions src/commands/project/retrieve/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { rm } from 'fs/promises';
import { dirname, join, resolve } from 'path';
import { rm } from 'node:fs/promises';
import { dirname, join, resolve } from 'node:path';

import * as fs from 'fs';
import * as fs from 'node:fs';
import { EnvironmentVariable, Lifecycle, Messages, OrgConfigProperties, SfError, SfProject } from '@salesforce/core';
import {
RetrieveResult,
Expand Down
4 changes: 2 additions & 2 deletions src/formatters/deployResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import * as path from 'node:path';
import { EOL } from 'node:os';
import * as fs from 'fs';
import * as fs from 'node:fs';
import { ux } from '@oclif/core';
import { DeployResult, FileResponse, RequestStatus } from '@salesforce/source-deploy-retrieve';
import { Org, SfError, Lifecycle } from '@salesforce/core';
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/metadataConvertResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import * as path from 'node:path';
import { ux } from '@oclif/core';
import { ConvertResult } from '@salesforce/source-deploy-retrieve';
import { Formatter, ConvertMdapiJson } from '../utils/types';
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/metadataRetrieveResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import * as path from 'node:path';
import { ux } from '@oclif/core';
import { FileResponse, RetrieveResult } from '@salesforce/source-deploy-retrieve';
import { Messages } from '@salesforce/core';
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/retrieveResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import * as path from 'node:path';
import { Ux } from '@salesforce/sf-plugins-core';
import { FileResponse, RetrieveMessage, RetrieveResult } from '@salesforce/source-deploy-retrieve';
import { NamedPackageDir, SfProject } from '@salesforce/core';
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/sourceConvertResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { resolve } from 'path';
import { resolve } from 'node:path';
import { ux } from '@oclif/core';
import { ConvertResult } from '@salesforce/source-deploy-retrieve';
import { SfError, Messages } from '@salesforce/core';
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/testResultsFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as os from 'os';
import * as os from 'node:os';
import { ux } from '@oclif/core';
import { dim, underline } from 'chalk';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/coverage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import * as path from 'node:path';

import {
ApexTestResultData,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as fs from 'fs';
import { resolve, extname } from 'path';
import * as fs from 'node:fs';
import { resolve, extname } from 'node:path';
import { Flags } from '@oclif/core';
import { Messages, Lifecycle } from '@salesforce/core';
import { PathInfo, TestLevel, reportsFormatters } from './types';
Expand Down
6 changes: 3 additions & 3 deletions src/utils/manifestCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import { homedir } from 'os';
import * as fs from 'fs';
import * as path from 'node:path';
import { homedir } from 'node:os';
import * as fs from 'node:fs';
import { ComponentSet } from '@salesforce/source-deploy-retrieve';
import { Global } from '@salesforce/core';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/metadataDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
/* eslint-disable class-methods-use-this */

import { EOL } from 'os';
import { EOL } from 'node:os';
import { cyan, red } from 'chalk';
import { Duration } from '@salesforce/kit';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'path';
import * as path from 'node:path';
import { blue, bold } from 'chalk';
import { StandardColors } from '@salesforce/sf-plugins-core';
import { FileResponse, FileResponseFailure, FileResponseSuccess } from '@salesforce/source-deploy-retrieve';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/previewOutput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import * as path from 'node:path';
import { ux } from '@oclif/core';
import { StandardColors } from '@salesforce/sf-plugins-core';
import { bold, dim } from 'chalk';
Expand Down
2 changes: 1 addition & 1 deletion test/commands/convert/source.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { join, resolve, sep } from 'path';
import { join, resolve, sep } from 'node:path';
import { ComponentSetBuilder, ComponentSetOptions, MetadataConverter } from '@salesforce/source-deploy-retrieve';
import * as sinon from 'sinon';
import { expect } from 'chai';
Expand Down
2 changes: 1 addition & 1 deletion test/commands/delete/source.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as fs from 'fs';
import * as fs from 'node:fs';
import * as sinon from 'sinon';
import { expect } from 'chai';
import {
Expand Down
2 changes: 1 addition & 1 deletion test/commands/deploy.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'path';
import * as path from 'node:path';
import { SourceTestkit } from '@salesforce/source-testkit';
import { writeJson } from '../../src/commands/deploy';
import { TestLevel } from '../../src/utils/types';
Expand Down
4 changes: 2 additions & 2 deletions test/commands/deploy/metadata/cancel.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { strict as assert } from 'node:assert';
import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit';
import { expect } from 'chai';
Expand Down
4 changes: 2 additions & 2 deletions test/commands/deploy/metadata/resume.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { strict as assert } from 'node:assert';
import { SourceTestkit } from '@salesforce/source-testkit';
import { expect } from 'chai';
Expand Down
2 changes: 1 addition & 1 deletion test/commands/deploy/metadata/validate.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'path';
import * as path from 'node:path';
import { SourceTestkit } from '@salesforce/source-testkit';
import { isObject } from '@salesforce/ts-types';
import { assert, expect } from 'chai';
Expand Down
2 changes: 1 addition & 1 deletion test/commands/retrieve/start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'path';
import * as path from 'node:path';
import * as sinon from 'sinon';
import { expect } from 'chai';
import {
Expand Down
4 changes: 2 additions & 2 deletions test/nuts/convert/mdapi.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { expect, assert } from 'chai';
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';
import { ComponentSet, SourceComponent } from '@salesforce/source-deploy-retrieve';
Expand Down
Loading

0 comments on commit 236ed9f

Please sign in to comment.