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

refactor: devScripts update #496

Merged
merged 4 commits into from
Oct 30, 2023
Merged
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
14 changes: 7 additions & 7 deletions messages/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ generate the command reference guide located

generate the command reference guide located

# pluginFlagSummary
# flags.plugins.summary

comma separated list of plugin names to be part of the generation. Defaults to the oclif plugin in the current working directory

# allFlagSummary
# flags.all.summary

include all relevant plugins in the generation

# hiddenFlagSummary
# flags.hidden.summary

show hidden commands

# outputdirFlagSummary
# flags.output-dir.summary

output directory to put generated files

# erroronwarningFlagSummary
# flags.error-on-warnings.summary

fail the command if there are any warnings

# ditamapSuffixFlagSummary
# flags.ditamap-suffix.summary

unique suffix to append to generated ditamap

# configPathFlagSummary
# flags.config-path.summary

A path to the directory containing a plugin or cli

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/salesforcecli/plugin-command-reference/issues",
"dependencies": {
"@oclif/core": "^2.15.0",
"@salesforce/core": "^5.3.10",
"@salesforce/core": "^5.3.16",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^3.1.28",
"@salesforce/ts-types": "^2.0.9",
Expand All @@ -17,22 +17,22 @@
"devDependencies": {
"@oclif/plugin-help": "^5.2.20",
"@salesforce/dev-config": "^4.1.0",
"@salesforce/dev-scripts": "^5.11.0",
"@salesforce/dev-scripts": "^5.12.2",
"@salesforce/plugin-auth": "^2.8.25",
"@salesforce/prettier-config": "^0.0.3",
"@types/debug": "^4.1.10",
"@types/ejs": "^3.1.4",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.61.0",
"chai": "^4.3.10",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^8.10.0",
"eslint-config-salesforce": "^2.0.2",
"eslint-config-salesforce-license": "^0.2.0",
"eslint-config-salesforce-typescript": "^1.1.2",
"eslint-config-salesforce-typescript": "^2.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsdoc": "^44.2.7",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-sf-plugin": "^1.16.9",
"husky": "^8.0.3",
"mocha": "^10.2.0",
Expand All @@ -43,7 +43,7 @@
"shx": "^0.3.3",
"sinon": "10.0.0",
"ts-node": "^10.0.0",
"typescript": "^4.9.5",
"typescript": "^5.2.2",
"wireit": "^0.14.1"
},
"engines": {
Expand Down
18 changes: 9 additions & 9 deletions src/commands/commandreference/generate.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 os from 'os';
import { resolve } from 'path';
import * as os from 'node:os';
import { resolve } from 'node:path';
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
// eslint-disable-next-line sf-plugin/no-oclif-flags-command-import
import { Command, Config, Interfaces } from '@oclif/core';
Expand Down Expand Up @@ -34,35 +34,35 @@ export default class CommandReferenceGenerate extends SfCommand<CommandReference
public static readonly flags = {
'output-dir': Flags.string({
char: 'd',
summary: messages.getMessage('outputdirFlagSummary'),
summary: messages.getMessage('flags.output-dir.summary'),
aliases: ['outputdir'],
deprecateAliases: true,
default: './tmp/root',
}),
plugins: Flags.string({
char: 'p',
summary: messages.getMessage('pluginFlagSummary'),
summary: messages.getMessage('flags.plugins.summary'),
multiple: true,
exclusive: ['all'],
}),
all: Flags.boolean({
char: 'a',
summary: messages.getMessage('allFlagSummary'),
summary: messages.getMessage('flags.all.summary'),
exclusive: ['plugins'],
}),
'ditamap-suffix': Flags.string({
char: 's',
summary: messages.getMessage('ditamapSuffixFlagSummary'),
summary: messages.getMessage('flags.ditamap-suffix.summary'),
default: Ditamap.SUFFIX,
}),
hidden: Flags.boolean({ summary: messages.getMessage('hiddenFlagSummary') }),
hidden: Flags.boolean({ summary: messages.getMessage('flags.hidden.summary') }),
'error-on-warnings': Flags.boolean({
summary: messages.getMessage('erroronwarningFlagSummary'),
summary: messages.getMessage('flags.error-on-warnings.summary'),
aliases: ['erroronwarnings'],
deprecateAliases: true,
}),
'config-path': Flags.directory({
summary: messages.getMessage('configPathFlagSummary'),
summary: messages.getMessage('flags.config-path.summary'),
char: 'c',
}),
};
Expand Down
2 changes: 1 addition & 1 deletion src/ditamap/command.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 } from 'path';
import { join } from 'node:path';
import { asString, Dictionary, ensureObject, ensureString } from '@salesforce/ts-types';
import { CommandClass, CommandData, CommandParameterData, punctuate, replaceConfigVariables } from '../utils';
import { Ditamap } from './ditamap';
Expand Down
4 changes: 2 additions & 2 deletions src/ditamap/ditamap.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, join } from 'path';
import * as fs from 'fs/promises';
import { dirname, join } from 'node:path';
import * as fs from 'node:fs/promises';
import * as debugCreator from 'debug';
import * as hb from 'handlebars';
import { HelperOptions } from 'handlebars';
Expand Down
2 changes: 1 addition & 1 deletion src/ditamap/topic-commands.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 } from 'path';
import { join } from 'node:path';
import { SfTopic } from '../utils';
import { Ditamap } from './ditamap';

Expand Down
2 changes: 1 addition & 1 deletion src/ditamap/topic-ditamap.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 } from 'path';
import { join } from 'node:path';
import { Ditamap } from './ditamap';

export class TopicDitamap extends Ditamap {
Expand Down
2 changes: 1 addition & 1 deletion src/docs.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/promises';
import * as fs from 'node:fs/promises';
import { AnyJson, ensureString } from '@salesforce/ts-types';
import * as chalk from 'chalk';
import { BaseDitamap } from './ditamap/base-ditamap';
Expand Down
4 changes: 2 additions & 2 deletions src/utils.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 { EventEmitter } from 'events';
import { EOL } from 'os';
import { EventEmitter } from 'node:events';
import { EOL } from 'node:os';
import { Command, Interfaces } from '@oclif/core';
import { AnyJson } from '@salesforce/ts-types';

Expand Down
6 changes: 3 additions & 3 deletions test/unit/endtoend.test.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 { access, rm } from 'fs/promises';
import { readFileSync } from 'fs';
import { join } from 'path';
import { access, rm } from 'node:fs/promises';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { expect } from 'chai';

/**
Expand Down
2 changes: 1 addition & 1 deletion test/unit/utils.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 { EOL } from 'os';
import { EOL } from 'node:os';
import { expect } from 'chai';
import { punctuate } from '../../src/utils';

Expand Down
Loading