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

Sm/linked-plugin-compile #517

Merged
merged 13 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from 9 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*-debug.log
*-error.log
.oclif.manifest.json
.vscode/settings.json
/.nyc_output
/coverage
/coverage.lcov
Expand Down
46 changes: 46 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229,
"skipFiles": ["<node_internals>/**"]
},
{
"name": "Run All Tests",
"type": "node",
"request": "launch",
"protocol": "inspector",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": ["--inspect", "--no-timeouts", "--colors", "test/**/*.test.ts"],
"env": {
"NODE_ENV": "development",
"SFDX_ENV": "development"
},
"sourceMaps": true,
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "Compile"
},
{
"type": "node",
"request": "launch",
"name": "Run Current Test",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": ["--inspect", "--no-timeouts", "--colors", "${file}"],
"env": {
"NODE_ENV": "development",
"SFDX_ENV": "development"
},
"sourceMaps": true,
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "Compile"
}
]
}
57 changes: 57 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"version": "2.0.0",
"problemMatcher": "$tsc-watch",
"tasks": [
{
"label": "Compile",
"group": {
"kind": "build",
"isDefault": true
},
"command": "yarn",
"type": "shell",
"presentation": {
"focus": false,
"panel": "dedicated"
},
"args": ["run", "prepack"],
"isBackground": false,
"problemMatcher": {
"owner": "typescript",
"fileLocation": "relative",
"pattern": {
"regexp": "^(.*\\.ts):(\\d*):(\\d*)(\\s*-\\s*)(error|warning|info)\\s*(TS\\d*):\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 5,
"code": 6,
"message": 7
}
}
},
{
"label": "Lint",
"command": "yarn",
"type": "shell",
"presentation": {
"focus": false,
"panel": "dedicated"
},
"args": ["run", "lint"],
"isBackground": false,
"problemMatcher": {
"owner": "typescript",
"fileLocation": "relative",
"pattern": {
"regexp": "^(ERROR|WARNING|INFO):\\s*(.*\\.ts):(\\d*):(\\d*)(\\s*-\\s*)(.*)$",
"file": 2,
"line": 3,
"column": 4,
"severity": 1,
"message": 6
}
}
}
]
}
6 changes: 3 additions & 3 deletions src/commands/plugins/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {sortBy} from '../../util'

function trimUntil(fsPath: string, part: string): string {
const parts = fsPath.split(path.sep)
const indicies = parts.reduce((a, e, i) => (e === part) ? a.concat([i]) : a, [] as number[])
const partIndex = Math.max(...indicies)
const indices = parts.reduce((a, e, i) => (e === part) ? a.concat([i]) : a, [] as number[])
const partIndex = Math.max(...indices)
if (partIndex === -1) return fsPath
return parts.slice(0, partIndex + 1).join(path.sep)
}
Expand Down Expand Up @@ -37,7 +37,7 @@ export default class PluginsInspect extends Command {
plugins = new Plugins(this.config);

// In this case we want these operations to happen
// sequentially so the `no-await-in-loop` rule is ugnored
// sequentially so the `no-await-in-loop` rule is ignored
/* eslint-disable no-await-in-loop */
async run(): Promise<void> {
const {flags, argv} = await this.parse(PluginsInspect)
Expand Down
2 changes: 1 addition & 1 deletion src/commands/plugins/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ e.g. If you have a core plugin that has a 'hello' command, installing a user-ins
plugins = new Plugins(this.config);

// In this case we want these operations to happen
// sequentially so the `no-await-in-loop` rule is ugnored
// sequentially so the `no-await-in-loop` rule is ignored
/* eslint-disable no-await-in-loop */
async run(): Promise<void> {
const {flags, argv} = await this.parse(PluginsInstall)
Expand Down
2 changes: 1 addition & 1 deletion src/commands/plugins/uninstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class PluginsUninstall extends Command {
plugins = new Plugins(this.config)

// In this case we want these operations to happen
// sequentially so the `no-await-in-loop` rule is ugnored
// sequentially so the `no-await-in-loop` rule is ignored
/* eslint-disable no-await-in-loop */
async run(): Promise<void> {
const {flags, argv} = await this.parse(PluginsUninstall)
Expand Down
Loading