Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
8,598 changes: 4,299 additions & 4,299 deletions packages/playwright-client/types/types.d.ts

Large diffs are not rendered by default.

8,598 changes: 4,299 additions & 4,299 deletions packages/playwright-core/types/types.d.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions utils/build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,7 @@ onChanges.push({
'docs/src/test-api/',
'docs/src/test-reporter-api/',
'docs/src/electron-api/',
'docs/src/mobile-api/',
'utils/generate_types/overrides.d.ts',
'utils/generate_types/overrides-test.d.ts',
'utils/generate_types/overrides-testReporter.d.ts',
Expand Down
10 changes: 7 additions & 3 deletions utils/doclint/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ async function run() {
const testApiRoot = path.join(documentationRoot, 'test-api');
const testReporterApiRoot = path.join(documentationRoot, 'test-reporter-api');
const electronApiRoot = path.join(documentationRoot, 'electron-api');
const mobileApiRoot = path.join(documentationRoot, 'mobile-api');
for (const lang of langs) {
try {
let documentation = parseApi(apiRoot);
Expand All @@ -144,6 +145,8 @@ async function run() {
parseApi(testReporterApiRoot)
).mergeWith(
parseApi(electronApiRoot, path.join(documentationRoot, 'api', 'params.md'))
).mergeWith(
parseApi(mobileApiRoot, path.join(documentationRoot, 'api', 'params.md'))
);
}
documentation.filterForLanguage(lang);
Expand Down Expand Up @@ -181,15 +184,15 @@ async function run() {

// Standardise naming and remove the filter in the file name
// Also, Internally (playwright.dev generator) we merge test-api and test-reporter-api into api.
const canonicalName = filePath.replace(/(-(js|python|csharp|java))+/, '').replace(/(\/|\\)(test-api|test-reporter-api|electron-api)(\/|\\)/, `${path.sep}api${path.sep}`);
const canonicalName = filePath.replace(/(-(js|python|csharp|java))+/, '').replace(/(\/|\\)(test-api|test-reporter-api|electron-api|mobile-api)(\/|\\)/, `${path.sep}api${path.sep}`);
mdSections.add(canonicalName);

const data = fs.readFileSync(filePath, 'utf-8');
let rootNode = md.filterNodesForLanguage(md.parse(data), lang);
// Validates code snippet groups.
rootNode = docs.processCodeGroups(rootNode, lang, tabs => tabs.map(tab => tab.spec));
// Renders links.
if (!filePath.startsWith(apiRoot) && !filePath.startsWith(testApiRoot) && !filePath.startsWith(testReporterApiRoot) && !filePath.startsWith(electronApiRoot))
if (!filePath.startsWith(apiRoot) && !filePath.startsWith(testApiRoot) && !filePath.startsWith(testReporterApiRoot) && !filePath.startsWith(electronApiRoot) && !filePath.startsWith(mobileApiRoot))
documentation.renderLinksInNodes(rootNode);
// Validate links.
{
Expand Down Expand Up @@ -268,7 +271,8 @@ async function run() {

// Check for missing docs
{
const apiDocumentation = parseApi(path.join(PROJECT_DIR, 'docs', 'src', 'api'));
const apiDocumentation = parseApi(path.join(PROJECT_DIR, 'docs', 'src', 'api'))
.mergeWith(parseApi(path.join(PROJECT_DIR, 'docs', 'src', 'mobile-api'), path.join(PROJECT_DIR, 'docs', 'src', 'api', 'params.md')));
apiDocumentation.filterForLanguage('js');
const srcClient = path.join(PROJECT_DIR, 'packages', 'playwright-core', 'src', 'client');
const sources = fs.readdirSync(srcClient).map(n => path.join(srcClient, n));
Expand Down
3 changes: 2 additions & 1 deletion utils/generate_types/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ class TypesGenerator {

(async function () {
const coreDocumentation = parseApi(path.join(PROJECT_DIR, 'docs', 'src', 'api'))
.mergeWith(parseApi(path.join(PROJECT_DIR, 'docs', 'src', 'electron-api'), path.join(PROJECT_DIR, 'docs', 'src', 'api', 'params.md')));
.mergeWith(parseApi(path.join(PROJECT_DIR, 'docs', 'src', 'electron-api'), path.join(PROJECT_DIR, 'docs', 'src', 'api', 'params.md')))
.mergeWith(parseApi(path.join(PROJECT_DIR, 'docs', 'src', 'mobile-api'), path.join(PROJECT_DIR, 'docs', 'src', 'api', 'params.md')));
const testDocumentation = parseApi(path.join(PROJECT_DIR, 'docs', 'src', 'test-api'), path.join(PROJECT_DIR, 'docs', 'src', 'api', 'params.md'));
const reporterDocumentation = parseApi(path.join(PROJECT_DIR, 'docs', 'src', 'test-reporter-api'));
const assertionClasses = new Set([
Expand Down
Loading