Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: salesforcecli/plugin-env
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.2.9
Choose a base ref
...
head repository: salesforcecli/plugin-env
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.0.1
Choose a head ref
  • 14 commits
  • 22 files changed
  • 5 contributors

Commits on Nov 4, 2023

  1. chore(dev-deps): bump @oclif/plugin-command-snapshot

    Bumps [@oclif/plugin-command-snapshot](https://github.com/oclif/plugin-command-snapshot) from 4.0.15 to 4.0.16.
    - [Release notes](https://github.com/oclif/plugin-command-snapshot/releases)
    - [Changelog](https://github.com/oclif/plugin-command-snapshot/blob/main/CHANGELOG.md)
    - [Commits](oclif/plugin-command-snapshot@4.0.15...4.0.16)
    
    ---
    updated-dependencies:
    - dependency-name: "@oclif/plugin-command-snapshot"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored Nov 4, 2023
    Copy the full SHA
    14cffa8 View commit details

Commits on Nov 5, 2023

  1. Merge pull request #747 from salesforcecli/dependabot-npm_and_yarn-oc…

    …lif-plugin-command-snapshot-4.0.16
    
    chore(dev-deps): bump @oclif/plugin-command-snapshot from 4.0.15 to 4.0.16
    svc-cli-bot authored Nov 5, 2023
    Copy the full SHA
    c5b12fb View commit details
  2. chore(dev-deps): bump eslint from 8.52.0 to 8.53.0

    Bumps [eslint](https://github.com/eslint/eslint) from 8.52.0 to 8.53.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.52.0...v8.53.0)
    
    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored Nov 5, 2023
    Copy the full SHA
    01d63bd View commit details
  3. Merge pull request #746 from salesforcecli/dependabot-npm_and_yarn-es…

    …lint-8.53.0
    
    chore(dev-deps): bump eslint from 8.52.0 to 8.53.0
    svc-cli-bot authored Nov 5, 2023
    Copy the full SHA
    e62e0bd View commit details
  4. Copy the full SHA
    cc6baf8 View commit details
  5. Merge pull request #750 from salesforcecli/devScripts2023-11-05

    refactor: devScripts update
    svc-cli-bot authored Nov 5, 2023
    Copy the full SHA
    af5b5de View commit details
  6. chore(dev-deps): bump eslint-plugin-sf-plugin from 1.16.3 to 1.16.14

    Bumps [eslint-plugin-sf-plugin](https://github.com/salesforcecli/eslint-plugin-sf-plugin) from 1.16.3 to 1.16.14.
    - [Release notes](https://github.com/salesforcecli/eslint-plugin-sf-plugin/releases)
    - [Changelog](https://github.com/salesforcecli/eslint-plugin-sf-plugin/blob/main/CHANGELOG.md)
    - [Commits](salesforcecli/eslint-plugin-sf-plugin@1.16.3...1.16.14)
    
    ---
    updated-dependencies:
    - dependency-name: eslint-plugin-sf-plugin
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored Nov 5, 2023
    Copy the full SHA
    3a3fb5c View commit details
  7. Merge pull request #748 from salesforcecli/dependabot-npm_and_yarn-es…

    …lint-plugin-sf-plugin-1.16.14
    
    chore(dev-deps): bump eslint-plugin-sf-plugin from 1.16.3 to 1.16.14
    svc-cli-bot authored Nov 5, 2023
    Copy the full SHA
    91f1c8a View commit details
  8. chore(dev-deps): bump @salesforce/cli-plugins-testkit

    Bumps [@salesforce/cli-plugins-testkit](https://github.com/salesforcecli/cli-plugins-testkit) from 4.3.6 to 4.4.12.
    - [Release notes](https://github.com/salesforcecli/cli-plugins-testkit/releases)
    - [Changelog](https://github.com/salesforcecli/cli-plugins-testkit/blob/main/CHANGELOG.md)
    - [Commits](salesforcecli/cli-plugins-testkit@4.3.6...4.4.12)
    
    ---
    updated-dependencies:
    - dependency-name: "@salesforce/cli-plugins-testkit"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored Nov 5, 2023
    Copy the full SHA
    02614c3 View commit details

Commits on Nov 6, 2023

  1. Merge pull request #745 from salesforcecli/dependabot-npm_and_yarn-sa…

    …lesforce-cli-plugins-testkit-4.4.12
    
    chore(dev-deps): bump @salesforce/cli-plugins-testkit from 4.3.6 to 4.4.12
    svc-cli-bot authored Nov 6, 2023
    Copy the full SHA
    7340e36 View commit details

Commits on Nov 7, 2023

  1. feat!: migrate to ESM

    BREAKING CHANGES: ESM and node 18 minimum
    mdonnalley committed Nov 7, 2023
    Copy the full SHA
    06cd431 View commit details
  2. chore: code review

    mdonnalley committed Nov 7, 2023
    Copy the full SHA
    3a05817 View commit details

Commits on Nov 8, 2023

  1. Merge pull request #751 from salesforcecli/mdonnalley/esm

    feat!: migrate to ESM
    WillieRuemmele authored Nov 8, 2023
    Copy the full SHA
    fd415e9 View commit details
  2. Copy the full SHA
    db60aa8 View commit details
Showing with 585 additions and 542 deletions.
  1. +1 −0 .eslintignore
  2. +2 −0 .gitignore
  3. +3 −0 .lintstagedrc.cjs
  4. +0 −3 .lintstagedrc.js
  5. +3 −2 .mocharc.json
  6. +2 −0 CHANGELOG.md
  7. +3 −3 README.md
  8. +0 −21 bin/dev
  9. +1 −1 bin/dev.cmd
  10. +8 −0 bin/dev.js
  11. +0 −3 bin/run
  12. +9 −0 bin/run.js
  13. 0 commitlint.config.js → commitlint.config.cjs
  14. +25 −44 package.json
  15. +4 −2 src/commands/env/display.ts
  16. +4 −2 src/commands/env/list.ts
  17. +4 −2 src/commands/env/open.ts
  18. +1 −1 src/index.ts
  19. +26 −46 test/commands/env/open.test.ts
  20. +1 −1 test/tsconfig.json
  21. +1 −1 tsconfig.json
  22. +487 −410 yarn.lock
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.cjs/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -45,3 +45,5 @@ node_modules

oclif.manifest.json
oclif.lock

oclif.lock
3 changes: 3 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'**/*.{js,json,md}?(x)': () => 'npm run reformat',
};
3 changes: 0 additions & 3 deletions .lintstagedrc.js

This file was deleted.

5 changes: 3 additions & 2 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"require": "ts-node/register,source-map-support/register",
"require": ["ts-node/register"],
"watch-extensions": "ts",
"recursive": true,
"reporter": "spec",
"timeout": 5000,
"watch-files": ["src/**/*.ts", "test/**/*.ts"]
"watch-files": ["src/**/*.ts", "test/**/*.ts"],
"node-option": ["loader=ts-node/esm"]
}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## [3.0.1](https://github.com/salesforcecli/plugin-env/compare/2.2.9...3.0.1) (2023-11-08)

## [2.2.9](https://github.com/salesforcecli/plugin-env/compare/2.2.8...2.2.9) (2023-10-30)

### Bug Fixes
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -96,7 +96,7 @@ EXAMPLES
$ sf env display --target-env myEnv
```

_See code: [src/commands/env/display.ts](https://github.com/salesforcecli/plugin-env/blob/2.2.9/src/commands/env/display.ts)_
_See code: [src/commands/env/display.ts](https://github.com/salesforcecli/plugin-env/blob/2.2.10/src/commands/env/display.ts)_

## `sf env list`

@@ -152,7 +152,7 @@ EXAMPLES
$ sf env list --csv --no-header
```

_See code: [src/commands/env/list.ts](https://github.com/salesforcecli/plugin-env/blob/2.2.9/src/commands/env/list.ts)_
_See code: [src/commands/env/list.ts](https://github.com/salesforcecli/plugin-env/blob/2.2.10/src/commands/env/list.ts)_

## `sf env open`

@@ -198,6 +198,6 @@ FLAG DESCRIPTIONS
browser applications differ depending on the operating system you're on; check your documentation for details.
```

_See code: [src/commands/env/open.ts](https://github.com/salesforcecli/plugin-env/blob/2.2.9/src/commands/env/open.ts)_
_See code: [src/commands/env/open.ts](https://github.com/salesforcecli/plugin-env/blob/2.2.10/src/commands/env/open.ts)_

<!-- commandsstop -->
21 changes: 0 additions & 21 deletions bin/dev

This file was deleted.

2 changes: 1 addition & 1 deletion bin/dev.cmd
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off

node "%~dp0\dev" %*
node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*
8 changes: 8 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
// eslint-disable-next-line node/shebang
async function main() {
const { execute } = await import('@oclif/core');
await execute({ development: true, dir: import.meta.url });
}

await main();
3 changes: 0 additions & 3 deletions bin/run

This file was deleted.

9 changes: 9 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env node

// eslint-disable-next-line node/shebang
async function main() {
const { execute } = await import('@oclif/core');
await execute({ dir: import.meta.url });
}

await main();
File renamed without changes.
69 changes: 25 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,35 @@
{
"name": "@salesforce/plugin-env",
"description": "An sf plugin for logging into and interacting with different Salesforce environments.",
"version": "2.2.9",
"version": "3.0.1",
"author": "Salesforce",
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^2.15.0",
"@oclif/core": "^3.10.6",
"@salesforce/core": "^5.3.15",
"@salesforce/sf-plugins-core": "^3.1.28",
"@salesforce/sf-plugins-core": "^4.0.0",
"change-case": "^4.1.2",
"open": "^8.4.2",
"tslib": "^2"
"open": "^8.4.2"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^4.0.15",
"@oclif/test": "^2.5.6",
"@salesforce/cli-plugins-testkit": "^4.3.6",
"@salesforce/dev-config": "^4.1.0",
"@salesforce/dev-scripts": "^5.12.2",
"@oclif/plugin-command-snapshot": "^5.0.1",
"@oclif/test": "^3.1.1",
"@salesforce/cli-plugins-testkit": "^5.0.2",
"@salesforce/dev-scripts": "^6.0.3",
"@salesforce/plugin-command-reference": "^3.0.45",
"@salesforce/plugin-functions": "^1.22.8",
"@salesforce/prettier-config": "^0.0.3",
"@salesforce/ts-sinon": "1.4.18",
"@swc/core": "^1.3.29",
"@types/shelljs": "^0.8.13",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.10",
"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": "^2.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-sf-plugin": "^1.16.3",
"husky": "^7.0.4",
"mocha": "^9.2.2",
"nyc": "^15.1.0",
"oclif": "^3.17.2",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"eslint-plugin-sf-plugin": "^1.16.14",
"oclif": "^4.0.3",
"shelljs": "^0.8.5",
"shx": "0.3.4",
"sinon": "10.0.1",
"ts-node": "^10.7.0",
"typescript": "^5.2.2",
"wireit": "^0.14.1"
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
},
"config": {},
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"files": [
"/lib",
@@ -65,7 +43,8 @@
"force",
"salesforce",
"sf",
"sf env"
"sf env",
"sf-plugin"
],
"license": "BSD-3-Clause",
"oclif": {
@@ -82,19 +61,20 @@
"env": {
"description": "Commands to manage your environments, such as orgs and compute environments."
}
}
},
"flexibleTaxonomy": true
},
"repository": "salesforcecli/plugin-env",
"scripts": {
"build": "wireit",
"clean": "sf-clean",
"clean-all": "sf-clean all",
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json oclif.lock",
"compile": "wireit",
"docs": "sf-docs",
"format": "wireit",
"lint": "wireit",
"postpack": "shx rm -f oclif.manifest.json",
"postpack": "shx rm -f oclif.manifest.json oclif.lock",
"prepack": "sf-prepack",
"prepare": "sf-install",
"test": "wireit",
@@ -105,7 +85,6 @@
"publishConfig": {
"access": "public"
},
"main": "lib/index.js",
"wireit": {
"build": {
"dependencies": [
@@ -182,7 +161,7 @@
"output": []
},
"test:command-reference": {
"command": "\"./bin/dev\" commandreference:generate --erroronwarnings",
"command": "ts-node \"./bin/dev.js\" commandreference:generate --erroronwarnings",
"files": [
"src/**/*.ts",
"messages/**",
@@ -193,7 +172,7 @@
]
},
"test:deprecation-policy": {
"command": "\"./bin/dev\" snapshot:compare",
"command": "ts-node \"./bin/dev.js\" snapshot:compare",
"files": [
"src/**/*.ts"
],
@@ -203,12 +182,14 @@
]
},
"test:json-schema": {
"command": "\"./bin/dev\" schema:compare",
"command": "ts-node \"./bin/dev.js\" schema:compare",
"files": [
"src/**/*.ts",
"schemas"
],
"output": []
}
}
},
"exports": "./lib/index.js",
"type": "module"
}
6 changes: 4 additions & 2 deletions src/commands/env/display.ts
Original file line number Diff line number Diff line change
@@ -5,11 +5,13 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { Messages } from '@salesforce/core';
import { SfCommand, SfHook, JsonObject, Flags } from '@salesforce/sf-plugins-core';
import { toKey, toValue } from '../../utils';
import { toKey, toValue } from '../../utils.js';

Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
const messages = Messages.loadMessages('@salesforce/plugin-env', 'display');

export default class EnvDisplay extends SfCommand<JsonObject> {
6 changes: 4 additions & 2 deletions src/commands/env/list.ts
Original file line number Diff line number Diff line change
@@ -5,12 +5,14 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { Interfaces } from '@oclif/core';
import { Messages } from '@salesforce/core';
import { Flags, SfCommand, JsonObject, SfHook, EnvList as Env } from '@salesforce/sf-plugins-core';
import { toKey, toValue } from '../../utils';
import { toKey, toValue } from '../../utils.js';

Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
const messages = Messages.loadMessages('@salesforce/plugin-env', 'list');

const envTypeValues = Object.keys(Env.EnvType);
6 changes: 4 additions & 2 deletions src/commands/env/open.ts
Original file line number Diff line number Diff line change
@@ -6,11 +6,13 @@
*/

import { URL } from 'node:url';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
import { Logger, Messages, Org, SfError } from '@salesforce/core';
import * as open from 'open';
import open from 'open';

Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
const messages = Messages.loadMessages('@salesforce/plugin-env', 'open');

export type OpenResult = { url: string };
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -5,4 +5,4 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

export = {};
export default {};
Loading