@backstage/config-loader 1.1.9 → 1.3.0-next.0

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
@@ -1,5 +1,70 @@
1
1
  # @backstage/config-loader
2
2
 
3
+ ## 1.3.0-next.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 201206132da: Introduced a new config source system to replace `loadConfig`. There is a new `ConfigSource` interface along with utilities provided by `ConfigSources`, as well as a number of built-in configuration source implementations. The new system is more flexible and makes it easier to create new and reusable sources of configuration, such as loading configuration from secret providers.
8
+
9
+ The following is an example of how to load configuration using the default behavior:
10
+
11
+ ```ts
12
+ const source = ConfigSources.default({
13
+ argv: options?.argv,
14
+ remote: options?.remote,
15
+ });
16
+ const config = await ConfigSources.toConfig(source);
17
+ ```
18
+
19
+ The `ConfigSource` interface looks like this:
20
+
21
+ ```ts
22
+ export interface ConfigSource {
23
+ readConfigData(options?: ReadConfigDataOptions): AsyncConfigSourceIterator;
24
+ }
25
+ ```
26
+
27
+ It is best implemented using an async iterator:
28
+
29
+ ```ts
30
+ class MyConfigSource implements ConfigSource {
31
+ async *readConfigData() {
32
+ yield {
33
+ config: [
34
+ {
35
+ context: 'example',
36
+ data: { backend: { baseUrl: 'http://localhost' } },
37
+ },
38
+ ],
39
+ };
40
+ }
41
+ }
42
+ ```
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies
47
+ - @backstage/cli-common@0.1.12
48
+ - @backstage/config@1.0.7
49
+ - @backstage/errors@1.1.5
50
+ - @backstage/types@1.0.2
51
+
52
+ ## 1.2.0
53
+
54
+ ### Minor Changes
55
+
56
+ - c791fcd96b9: Configuration validation is now more permissive when it comes to config whose values are `string` but whose schemas declare them to be `boolean` or `number`.
57
+
58
+ For example, configuration was previously marked invalid when a string `'true'` was set on a property expecting type `boolean` or a string `'146'` was set on a property expecting type `number` (as when providing configuration via variable substitution sourced from environment variables). Now, such configurations will be considered valid and their values will be coerced to the right type at read-time.
59
+
60
+ ### Patch Changes
61
+
62
+ - Updated dependencies
63
+ - @backstage/cli-common@0.1.12
64
+ - @backstage/config@1.0.7
65
+ - @backstage/errors@1.1.5
66
+ - @backstage/types@1.0.2
67
+
3
68
  ## 1.1.9
4
69
 
5
70
  ### Patch Changes