Skip to content

Commit 7f43aa5

Browse files
refactor: devScripts update (#667)
* chore: updates from devScripts * fix(deps): node16 module resolution for ut * chore: remove header --------- Co-authored-by: mshanemc <[email protected]>
1 parent cda2c48 commit 7f43aa5

File tree

8 files changed

+263
-257
lines changed

8 files changed

+263
-257
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"ts-retry-promise": "^0.8.1"
5757
},
5858
"devDependencies": {
59-
"@salesforce/dev-scripts": "^10.2.2",
59+
"@salesforce/dev-scripts": "^10.2.7",
6060
"@salesforce/ts-sinon": "^1.4.22",
6161
"@types/debug": "^4.1.12",
6262
"ts-node": "^10.9.2",

src/zip.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
import * as fs from 'node:fs';
88
import * as path from 'node:path';
9-
import * as JSZip from 'jszip';
9+
import JSZip from 'jszip';
1010
import Debug from 'debug';
1111

1212
export type ZipDirConfig = {
@@ -25,7 +25,7 @@ export type ZipDirConfig = {
2525
* E.g., "myArchivedDir.zip"
2626
*/
2727
name: string;
28-
}
28+
};
2929

3030
/**
3131
* Zip the contents of a directory to a file.

test/unit/execCmd.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import * as fs from 'node:fs';
7+
import fs from 'node:fs';
88
import { join } from 'node:path';
99
import { expect, assert, config } from 'chai';
10-
import * as sinon from 'sinon';
10+
import sinon from 'sinon';
1111
import { Duration, env } from '@salesforce/kit';
1212
import { stubMethod } from '@salesforce/ts-sinon';
13-
import * as shelljs from 'shelljs';
13+
import shelljs from 'shelljs';
1414
import { ShellString } from 'shelljs';
1515
import { beforeEach } from 'mocha';
1616
import { execCmd } from '../../src';

test/unit/testProject.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import * as fs from 'node:fs';
7+
import fs from 'node:fs';
88
import { tmpdir } from 'node:os';
99
import { join as pathJoin } from 'node:path';
1010
import { assert, expect } from 'chai';
11-
import * as sinon from 'sinon';
12-
import * as shelljs from 'shelljs';
11+
import sinon from 'sinon';
12+
import shelljs from 'shelljs';
1313
import { ShellString } from 'shelljs';
1414
import { stubMethod } from '@salesforce/ts-sinon';
1515
import { env } from '@salesforce/kit';

test/unit/testSession.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
// For testing private properties of TestSession
99
/* eslint-disable @typescript-eslint/ban-ts-comment */
10-
import * as fs from 'node:fs';
11-
import * as path from 'node:path';
10+
import fs from 'node:fs';
11+
import path from 'node:path';
1212
import { assert, expect } from 'chai';
13-
import * as sinon from 'sinon';
14-
import * as shelljs from 'shelljs';
13+
import sinon from 'sinon';
14+
import shelljs from 'shelljs';
1515
import { ShellString } from 'shelljs';
1616
import { spyMethod, stubMethod } from '@salesforce/ts-sinon';
1717
import { env } from '@salesforce/kit';

test/unit/zip.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import * as fs from 'node:fs';
7+
import fs from 'node:fs';
88
import { join } from 'node:path';
99
import { tmpdir } from 'node:os';
1010
import { expect } from 'chai';
11-
import * as JSZip from 'jszip';
11+
import JSZip from 'jszip';
1212
import { zipDir } from '../../src/zip';
1313

1414
describe('zipDir', () => {

test/unit/zzhubAuth.test.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@
1111
* a number of the testSession fail. Running these tests after testSession tests seems to work,
1212
* so chose a file name that guarantees these will be run last.
1313
*/
14-
import * as fs from 'node:fs';
15-
import * as os from 'node:os';
16-
import * as path from 'node:path';
14+
import fs from 'node:fs';
15+
import os from 'node:os';
16+
import path from 'node:path';
1717
import { stubMethod } from '@salesforce/ts-sinon';
18-
import * as chai from 'chai';
18+
import { expect } from 'chai';
1919
import { AuthFields } from '@salesforce/core';
2020
import { Env, env } from '@salesforce/kit';
21-
import * as sinon from 'sinon';
22-
import * as shell from 'shelljs';
21+
import sinon from 'sinon';
22+
import shell from 'shelljs';
2323
import { prepareForAuthUrl, prepareForJwt, transferExistingAuthToEnv } from '../../src/hubAuth';
2424

25-
const { expect } = chai;
2625
const tmp = os.tmpdir();
2726
type SampleData = {
2827
jwtKeyWithHeaderFooter: string;

0 commit comments

Comments
 (0)