fix API reference + add regression test

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-01-19 20:03:59 +01:00
parent ce5edcbc05
commit c540922cad
3 changed files with 43 additions and 25 deletions
+3
View File
@@ -124,6 +124,9 @@ jobs:
- name: check api reports and generate API reference
run: yarn build:api-reports:only --ci --docs
- name: verify api reference
run: node scripts/verify-api-reference.js
- name: verify changesets
run: node scripts/verify-changesets.js
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env node
/*
* Copyright 2020 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable import/no-extraneous-dependencies */
const { resolve: resolvePath } = require('path');
const { promises: fs } = require('fs');
async function main() {
const indexContent = await fs.readFile(
resolvePath(__dirname, '../docs/reference/index.md'),
'utf8',
);
if (!indexContent.includes('types used within Backstage')) {
throw new Error(
'Could not find package documentation for @backstage/types in the API reference index',
);
}
}
main().catch(error => {
console.error(error.stack);
process.exit(1);
});
+1 -25
View File
@@ -4928,7 +4928,7 @@
js-yaml "~3.13.1"
resolve "~1.17.0"
"@microsoft/api-extractor-model@7.15.1":
"@microsoft/api-extractor-model@7.15.1", "@microsoft/api-extractor-model@^7.15.1":
version "7.15.1"
resolved "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.15.1.tgz#e52d68676e846d8b86e3b18e2654af39fba6e4a1"
integrity sha512-DWfS1o3oMY0mzdO3OuQbD/9vzn80jwM6tFd7XbiYnkpxwhD83LMGXz7NZWwSh+IaA+9w3LF4w62fT31Qq+dAMw==
@@ -4937,15 +4937,6 @@
"@microsoft/tsdoc-config" "~0.15.2"
"@rushstack/node-core-library" "3.44.2"
"@microsoft/api-extractor-model@^7.15.1":
version "7.15.3"
resolved "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.15.3.tgz#cf76deeeb2733d974da678f530c2dbaceb18a065"
integrity sha512-NkSjolmSI7NGvbdz0Y7kjQfdpD+j9E5CwXTxEyjDqxd10MI7GXV8DnAsQ57GFJcgHKgTjf2aUnYfMJ9w3aMicw==
dependencies:
"@microsoft/tsdoc" "0.13.2"
"@microsoft/tsdoc-config" "~0.15.2"
"@rushstack/node-core-library" "3.45.0"
"@microsoft/api-extractor@^7.19.2":
version "7.19.2"
resolved "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.19.2.tgz#8c546003523163c1432f6e19506065f790d6182c"
@@ -5758,21 +5749,6 @@
timsort "~0.3.0"
z-schema "~5.0.2"
"@rushstack/node-core-library@3.45.0":
version "3.45.0"
resolved "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.45.0.tgz#8c86b39271b6d84260b1e70db87e1e265b54f620"
integrity sha512-YMuIJl19vQT1+g/OU9mLY6T5ZBT9uDlmeXExDQACpGuxTJW+LHNbk/lRX+eCApQI2eLBlaL4U68r3kZlqwbdmw==
dependencies:
"@types/node" "12.20.24"
colors "~1.2.1"
fs-extra "~7.0.1"
import-lazy "~4.0.0"
jju "~1.4.0"
resolve "~1.17.0"
semver "~7.3.0"
timsort "~0.3.0"
z-schema "~5.0.2"
"@rushstack/rig-package@0.3.6":
version "0.3.6"
resolved "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.3.6.tgz#a57b53db59106fb93bcda36cad4f8602f508ebc6"