Skip to content

Commit

Permalink
[docs-utils] remove extra api_docs dir
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Jan 10, 2023
1 parent 30b8a2d commit a88a0be
Show file tree
Hide file tree
Showing 72 changed files with 149 additions and 149 deletions.
2 changes: 1 addition & 1 deletion dev_docs/contributing/documentation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ There are three great ways to debug issues with the API infrastructure.

1. Write a test

[api_doc_suite.test.ts](https://github.com/elastic/kibana/blob/main/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts) is a pretty comprehensive test suite that builds the test docs inside the [**fixtures** folder](https://github.com/elastic/kibana/tree/main/packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src).
[api_doc_suite.test.ts](https://github.com/elastic/kibana/blob/main/packages/kbn-docs-utils/src/tests/api_doc_suite.test.ts) is a pretty comprehensive test suite that builds the test docs inside the [**fixtures** folder](https://github.com/elastic/kibana/tree/main/packages/kbn-docs-utils/src/tests/__fixtures__/src).

Edit the code inside `__fixtures__` to replicate the bug, write a test to track what should happen, then run `yarn jest api_doc_suite`.

Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-docs-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* Side Public License, v 1.
*/

export { runBuildApiDocsCli } from './src/api_docs';
export { runBuildApiDocsCli } from './src';
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ it('test full file imports with a matching plugin', () => {
"pluginId": "pluginA",
"scope": "public",
"section": undefined,
"text": "packages/kbn-docs-utils/src/api_docs/integration_tests/__fixtures__/src/plugin_a/public/foo/index",
"text": "packages/kbn-docs-utils/src/integration_tests/__fixtures__/src/plugin_a/public/foo/index",
},
" something",
]
Expand Down
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"signature": [
"() => void"
],
"path": "packages/kbn-docs-utils/src/api_docs/integration_tests/__fixtures__/src/plugin_a/public/foo/index.ts",
"path": "packages/kbn-docs-utils/src/integration_tests/__fixtures__/src/plugin_a/public/foo/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [],
Expand All @@ -34,7 +34,7 @@
"signature": [
"() => \"foo\""
],
"path": "packages/kbn-docs-utils/src/api_docs/integration_tests/__fixtures__/src/plugin_a/public/foo/index.ts",
"path": "packages/kbn-docs-utils/src/integration_tests/__fixtures__/src/plugin_a/public/foo/index.ts",
"deprecated": false,
"trackAdoption": false,
"returnComment": [],
Expand Down Expand Up @@ -68,12 +68,12 @@
"signature": [
"\"COMMON VAR!\""
],
"path": "packages/kbn-docs-utils/src/api_docs/integration_tests/__fixtures__/src/plugin_a/common/foo/index.ts",
"path": "packages/kbn-docs-utils/src/integration_tests/__fixtures__/src/plugin_a/common/foo/index.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
}
],
"objects": []
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"<any>"
],
"path": "packages/kbn-docs-utils/src/api_docs/integration_tests/__fixtures__/src/plugin_b/public/index.ts",
"path": "packages/kbn-docs-utils/src/integration_tests/__fixtures__/src/plugin_b/public/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
Expand All @@ -50,7 +50,7 @@
},
"<any>"
],
"path": "packages/kbn-docs-utils/src/api_docs/integration_tests/__fixtures__/src/plugin_b/public/index.ts",
"path": "packages/kbn-docs-utils/src/integration_tests/__fixtures__/src/plugin_b/public/index.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
Expand Down Expand Up @@ -81,4 +81,4 @@
"misc": [],
"objects": []
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ it('test getServiceForPath', () => {

expect(
getServiceForPath(
'/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-docs-utils/src/api_docs/integration_tests/__fixtures__/src/plugin_a/public/foo/index',
'/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-docs-utils/src/api_docs/integration_tests/__fixtures__/src/plugin_a'
'/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-docs-utils/src/integration_tests/__fixtures__/src/plugin_a/public/foo/index',
'/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-docs-utils/src/integration_tests/__fixtures__/src/plugin_a'
)
).toBe('foo');
});
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/kbn-ts-projects/ts_projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const TS_PROJECTS = TsProject.loadAll({
/** Array of repo-relative paths to projects which should be ignored and not treated as a TS project in the repo */
ignore: [
'x-pack/plugins/apm/scripts/optimize_tsconfig/tsconfig.json',
'packages/kbn-docs-utils/src/api_docs/integration_tests/__fixtures__/src/**/*',
'packages/kbn-docs-utils/src/integration_tests/__fixtures__/src/**/*',
],

/** Array of repo-relative paths to projects which should have their type-check disabled */
Expand Down

0 comments on commit a88a0be

Please sign in to comment.