Skip to content

Commit 23e04c1

Browse files
author
Arnold Trakhtenberg
authored
Merge pull request #13 from launchdarkly/minor-fixes
Prepare 2.1.0
2 parents 34388ed + 9d6357f commit 23e04c1

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to the "launchdarkly" extension will be documented in this file.
44

5+
## [2.1.0] - 2019-02-07
6+
7+
### Changed
8+
9+
- Updated dependencies to resolve security vulnerabilities with transitive dependencies.
10+
- Fixed error message typo. Thanks @InTheCloudDan
11+
512
## [2.0.4] - 2019-02-07
613

714
### Changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "launchdarkly",
33
"displayName": "LaunchDarkly",
44
"description": "View LaunchDarkly feature flags in your editor.",
5-
"version": "2.0.4",
5+
"version": "2.1.0",
66
"publisher": "launchdarkly",
77
"engines": {
88
"vscode": "^1.34.0"

src/flags.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ const LD_MODE: vscode.DocumentFilter = {
1919
scheme: 'file',
2020
};
2121

22+
function unexpectedError(flagKey: string) {
23+
return vscode.window.showErrorMessage(
24+
`[LaunchDarkly] Encountered an unexpected error retrieving the flag ${flagKey}`,
25+
);
26+
}
27+
2228
function getFeatureFlag(settings: IConfiguration, flagKey: string, cb: Function) {
2329
let envParam = settings.env ? '?env=' + settings.env : '';
2430
let options = {
@@ -45,19 +51,17 @@ function getFeatureFlag(settings: IConfiguration, flagKey: string, cb: Function)
4551
vscode.window.showErrorMessage(`[LaunchDarkly] Could not find the flag ${flagKey}`);
4652
return;
4753
} else {
48-
vscode.window.showErrorMessage(`[LaunchDarkly] Encountered an unexpected retrieving the flag ${flagKey}`);
54+
unexpectedError(flagKey);
4955
}
5056
} else {
51-
vscode.window.showErrorMessage(
52-
`[LaunchDarkly] Encountered an unexpected error retrieving the flag ${flagKey}`,
53-
);
57+
unexpectedError(flagKey);
5458
}
5559
});
5660
} else {
5761
vscode.window.showErrorMessage(response.statusCode);
5862
}
5963
} else {
60-
vscode.window.showErrorMessage(`[LaunchDarkly] Encountered an unexpected error retrieving the flag ${flagKey}`);
64+
unexpectedError(flagKey);
6165
}
6266
});
6367
}

0 commit comments

Comments
 (0)