Skip to content

Commit

Permalink
chore: update depdendencies, group all dependabot PRs under same group (
Browse files Browse the repository at this point in the history
#47)

* chore: update depdendencies, group all dependabot PRs under same group

* revert small change in package.json
  • Loading branch information
k-capehart authored Jul 3, 2024
1 parent efb1f3b commit 6347c3d
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 110 deletions.
17 changes: 3 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,7 @@ updates:
prefix-development: chore(dev-deps)
ignore:
- dependency-name: '@salesforce/dev-scripts'
- dependency-name: '*'
update-types: ['version-update:semver-major']
groups:
dev-dependencies:
applies-to: version-updates
dependency-type: development
update-types:
- "minor"
- "patch"
prod-dependencies:
applies-to: version-updates
dependency-type: production
update-types:
- "minor"
- "patch"
dependencies:
patterns:
- '*'
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
},
"homepage": "https://github.com/k-capehart/kc-sf-plugin",
"dependencies": {
"@oclif/core": "^3.26.2",
"@salesforce/core": "^7.3.8",
"@salesforce/sf-plugins-core": "^9.1.1",
"@salesforce/source-deploy-retrieve": "^11.6.7",
"@salesforce/source-tracking": "^6.5.1",
"@salesforce/ts-sinon": "^1.4.19",
"@salesforce/ts-types": "^2.0.9",
"@oclif/core": "^4.0.8",
"@salesforce/core": "^8.1.0",
"@salesforce/sf-plugins-core": "^11.1.2",
"@salesforce/source-deploy-retrieve": "^12.1.4",
"@salesforce/source-tracking": "^7.0.5",
"@salesforce/ts-sinon": "^1.4.22",
"@salesforce/ts-types": "^2.0.10",
"chalk": "^5.3.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/diffSource.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Much of the code in this file is taken from: https://github.com/salesforcecli/plugin-deploy-retrieve

import { isAbsolute, relative, resolve } from 'node:path';

import { ux } from '@oclif/core';
import { Ux } from '@salesforce/sf-plugins-core';
import { StandardColors } from '@salesforce/sf-plugins-core';
import chalk from 'chalk';
import { Messages, Org, SfProject } from '@salesforce/core';
Expand All @@ -26,6 +25,7 @@ import { API, isSourceComponentWithXml } from './types.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('kc-sf-plugin', 'previewMessages');
const ux = new Ux();

type BaseOperation = 'deploy' | 'retrieve';

Expand Down
5 changes: 3 additions & 2 deletions src/utils/triggerFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import * as fs from 'node:fs';
import * as path from 'node:path';
import { fileURLToPath } from 'node:url';
import { Messages } from '@salesforce/core';
import { ux } from '@oclif/core';
import { Ux } from '@salesforce/sf-plugins-core';
import { ApexFileType, JsonData, TemplateFiles, apiVersion } from './types.js';

const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
const sharedTemplates = path.resolve(dirname, '../templates/shared/');
const ux = new Ux();
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const apexFactoryMessages = Messages.loadMessages('kc-sf-plugin', 'apexFactory');

Expand All @@ -29,7 +30,7 @@ export const generateTemplate = (targetDir: string, templateDir: string, init: b
const jsonData = JSON.parse(data) as JsonData;

for (const [template, details] of Object.entries(jsonData)) {
let fileName = details.name;
let fileName: string = details.name;
for (const [key, val] of tokens) {
fileName = fileName.replaceAll(key, val);
}
Expand Down
6 changes: 4 additions & 2 deletions test/utils/diffSource.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ux } from '@oclif/core';
import { Ux } from '@salesforce/sf-plugins-core';
import { expect } from 'chai';
import { TestContext } from '@salesforce/core/testSetup';
import sinon from 'sinon';
import { PreviewResult, printTables } from '../../src/utils/diffSource.js';

const mockRetrievePreviewOutput: PreviewResult = {
Expand Down Expand Up @@ -102,9 +103,10 @@ const mockDeployPreviewOutput: PreviewResult = {
describe('diff table', () => {
let tableStub: sinon.SinonStub;
const $$ = new TestContext();
const sandbox = sinon.createSandbox();

beforeEach(() => {
tableStub = $$.SANDBOX.stub(ux, 'table');
tableStub = sandbox.stub(Ux.prototype, 'table');
});

afterEach(() => {
Expand Down
Loading

0 comments on commit 6347c3d

Please sign in to comment.