@backstage/config-loader
Advanced tools
Comparing version 0.9.7 to 1.0.0
# @backstage/config-loader | ||
## 1.0.0 | ||
### Major Changes | ||
- b58c70c223: This package has been promoted to v1.0! To understand how this change affects the package, please check out our [versioning policy](https://backstage.io/docs/overview/versioning-policy). | ||
### Patch Changes | ||
- 664821371e: The `typescript-json-schema` dependency that is used during schema collection is now lazy loaded, as it eagerly loads in the TypeScript compiler. | ||
- f910c2a3f8: build(deps): bump `typescript-json-schema` from 0.52.0 to 0.53.0 | ||
- Updated dependencies | ||
- @backstage/config@1.0.0 | ||
- @backstage/errors@1.0.0 | ||
- @backstage/types@1.0.0 | ||
## 0.9.7 | ||
@@ -4,0 +19,0 @@ |
@@ -13,3 +13,2 @@ 'use strict'; | ||
var fs = require('fs-extra'); | ||
var typescriptJsonSchema = require('typescript-json-schema'); | ||
var chokidar = require('chokidar'); | ||
@@ -20,2 +19,20 @@ var fetch = require('node-fetch'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { return e[k]; } | ||
}); | ||
} | ||
}); | ||
} | ||
n["default"] = e; | ||
return Object.freeze(n); | ||
} | ||
var yaml__default = /*#__PURE__*/_interopDefaultLegacy(yaml); | ||
@@ -417,10 +434,11 @@ var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv); | ||
]); | ||
const tsSchemas = compileTsSchemas(tsSchemaPaths); | ||
const tsSchemas = await compileTsSchemas(tsSchemaPaths); | ||
return schemas.concat(tsSchemas); | ||
} | ||
function compileTsSchemas(paths) { | ||
async function compileTsSchemas(paths) { | ||
if (paths.length === 0) { | ||
return []; | ||
} | ||
const program = typescriptJsonSchema.getProgramFromFiles(paths, { | ||
const { getProgramFromFiles, generateSchema } = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('typescript-json-schema')); }); | ||
const program = getProgramFromFiles(paths, { | ||
incremental: false, | ||
@@ -440,3 +458,3 @@ isolatedModules: true, | ||
try { | ||
value = typescriptJsonSchema.generateSchema(program, "Config", { | ||
value = generateSchema(program, "Config", { | ||
required: true, | ||
@@ -443,0 +461,0 @@ validationKeywords: ["visibility", "deprecated"] |
{ | ||
"name": "@backstage/config-loader", | ||
"description": "Config loading functionality used by Backstage backend, and CLI", | ||
"version": "0.9.7", | ||
"version": "1.0.0", | ||
"private": false, | ||
@@ -38,5 +38,5 @@ "publishConfig": { | ||
"@backstage/cli-common": "^0.1.8", | ||
"@backstage/config": "^0.1.15", | ||
"@backstage/errors": "^0.2.2", | ||
"@backstage/types": "^0.1.3", | ||
"@backstage/config": "^1.0.0", | ||
"@backstage/errors": "^1.0.0", | ||
"@backstage/types": "^1.0.0", | ||
"@types/json-schema": "^7.0.6", | ||
@@ -50,3 +50,3 @@ "ajv": "^7.0.3", | ||
"node-fetch": "^2.6.7", | ||
"typescript-json-schema": "^0.52.0", | ||
"typescript-json-schema": "^0.53.0", | ||
"yaml": "^1.9.2", | ||
@@ -67,4 +67,4 @@ "yup": "^0.32.9" | ||
], | ||
"gitHead": "60c4e39d1fcaeb10d6488ada1d907f34dc2a105a", | ||
"gitHead": "e9496f746b31600dbfac7fa76987479e66426257", | ||
"module": "dist/index.esm.js" | ||
} |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
138706
933
0
+ Added@backstage/config@1.3.2(transitive)
+ Added@backstage/errors@1.2.7(transitive)
+ Added@backstage/types@1.2.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addedpath-equal@1.1.2(transitive)
+ Addedtypescript@4.6.4(transitive)
+ Addedtypescript-json-schema@0.53.1(transitive)
- Removed@backstage/config@0.1.15(transitive)
- Removed@backstage/errors@0.2.2(transitive)
- Removed@backstage/types@0.1.3(transitive)
- Removedcross-fetch@3.2.0(transitive)
- Removedtypescript@4.4.4(transitive)
- Removedtypescript-json-schema@0.52.0(transitive)
Updated@backstage/config@^1.0.0
Updated@backstage/errors@^1.0.0
Updated@backstage/types@^1.0.0