@scaleway/configuration-loader 0.1.0-beta.6 → 0.1.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.1.0-beta.7 (2023-01-27)
7
+
8
+ ### Features
9
+
10
+ - update to Node18, remove cross-fetch, and run tests on node+jsdom ([#386](https://github.com/scaleway/scaleway-sdk-js/issues/386)) ([4e1fe02](https://github.com/scaleway/scaleway-sdk-js/commit/4e1fe02b54939d2d4008b9c53d56ea2553c796fb))
11
+
6
12
  ## 0.1.0-beta.6 (2023-01-03)
7
13
 
8
14
  ### Features
package/dist/index.cjs CHANGED
@@ -100,7 +100,7 @@ const convertYamlToConfiguration = input => {
100
100
  currentSection = undefined;
101
101
  if (newSection[1] === 'profiles') {
102
102
  foundProfilesKey = true;
103
- } else if (foundProfilesKey === true) {
103
+ } else if (foundProfilesKey) {
104
104
  [, currentSection] = newSection;
105
105
  }
106
106
  }
@@ -175,7 +175,7 @@ const loadProfileFromEnvironmentValues = () => ({
175
175
  * @public
176
176
  */
177
177
  const loadAllProfilesFromConfigurationFile = params => {
178
- const filePath = (params == null ? void 0 : params.filepath) ?? resolveConfigurationFilePath();
178
+ const filePath = params?.filepath ?? resolveConfigurationFilePath();
179
179
  if (typeof filePath !== 'string' || filePath.length === 0) {
180
180
  throw new Error('Could not find the path to the configuration file.');
181
181
  }
@@ -200,7 +200,7 @@ const loadAllProfilesFromConfigurationFile = params => {
200
200
  */
201
201
  const loadProfileFromConfigurationFile = params => {
202
202
  const configs = loadAllProfilesFromConfigurationFile(params);
203
- const profileName = (params == null ? void 0 : params.profileName) ?? 'default';
203
+ const profileName = params?.profileName ?? 'default';
204
204
  const profileMap = configs[profileName];
205
205
  if (typeof profileMap !== 'object') {
206
206
  throw new Error(`Could not find the desired profile '${profileName}' in the configuration file.`);
@@ -28,7 +28,7 @@ const convertYamlToConfiguration = input => {
28
28
  currentSection = undefined;
29
29
  if (newSection[1] === 'profiles') {
30
30
  foundProfilesKey = true;
31
- } else if (foundProfilesKey === true) {
31
+ } else if (foundProfilesKey) {
32
32
  [, currentSection] = newSection;
33
33
  }
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/configuration-loader",
3
- "version": "0.1.0-beta.6",
3
+ "version": "0.1.0-beta.7",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Load configuration via file or environment for NodeJS.",
6
6
  "main": "dist/index.cjs",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "type": "module",
21
21
  "devDependencies": {
22
- "@types/node": "^18.11.10"
22
+ "@types/node": "^18.11.18"
23
23
  },
24
- "gitHead": "0aca532d8c1f7954def5216262ca6c6adb5aa590"
24
+ "gitHead": "d58e6175a5b8b8a3727097710b2ebcee012f924b"
25
25
  }