Skip to content
Draft
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
49 changes: 47 additions & 2 deletions build-tools/tasks/docs.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,65 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const fs = require('fs');
const path = require('path');
const { writeComponentsDocumentation, writeTestUtilsDocumentation } = require('@cloudscape-design/documenter');
const workspace = require('../utils/workspace');

// Dash-case names of the versioned beta components — the dirs matching the beta documenter glob
// (src/beta/<name>-<major.minor>/<component>/index.tsx). Used to flag their generated definitions.
function getBetaComponentNames(srcDir = 'src') {
const betaRoot = path.join(srcDir, 'beta');
if (!fs.existsSync(betaRoot)) {
return [];
}
const names = [];
for (const versionDir of fs.readdirSync(betaRoot)) {
const versionPath = path.join(betaRoot, versionDir);
if (!fs.statSync(versionPath).isDirectory()) {
continue;
}
for (const component of fs.readdirSync(versionPath)) {
if (fs.existsSync(path.join(versionPath, component, 'index.tsx'))) {
names.push(component);
}
}
}
return names;
}

module.exports = function docs() {
const componentsOutDir = path.join(workspace.apiDocsPath, 'components');

// Document the stable components AND the versioned beta components into the SINGLE `components`
// output (one combined glob → one index barrel; the documenter rewrites the index from its glob,
// so a second same-outDir pass would clobber it). Beta components are NOT shipped as a separate
// barrel; they live in `components` and are distinguished by the `releaseStatus: 'beta'` flag
// stamped below.
writeComponentsDocumentation({
outDir: path.join(workspace.apiDocsPath, 'components'),
outDir: componentsOutDir,
tsconfigPath: require.resolve('../../tsconfig.json'),
publicFilesGlob: 'src/*/index.tsx',
publicFilesGlob: 'src/{*/index.tsx,beta/*/*/index.tsx}',
extraExports: {
FileDropzone: ['useFilesDragging'],
IconProvider: ['defineIcons', 'IconRegistry', 'IconMap'],
TagEditor: ['getTagsDiff'],
},
});

// The documenter hard-codes `releaseStatus: 'stable'` with no tag override, so stamp the beta
// components' generated definitions as `beta`. The website derives `isBeta` from this (beta page
// header alert + nav badge), keeping the single components barrel with per-component flagging.
for (const name of getBetaComponentNames('src')) {
const definitionFile = path.join(componentsOutDir, `${name}.js`);
if (!fs.existsSync(definitionFile)) {
continue;
}

const definition = require(path.resolve(definitionFile));
definition.releaseStatus = 'beta';
fs.writeFileSync(definitionFile, `module.exports = ${JSON.stringify(definition, null, 2)};`);
}

writeTestUtilsDocumentation({
outDir: path.join(workspace.apiDocsPath, 'test-utils-doc'),
tsconfigPath: require.resolve('../../src/test-utils/tsconfig.json'),
Expand Down
9 changes: 8 additions & 1 deletion build-tools/tasks/package-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const { parallel } = require('gulp');
const path = require('path');
const fs = require('fs');
const { writeFile, listPublicItems } = require('../utils/files');
const { writeFile, listPublicItems, listBetaItems } = require('../utils/files');
const themes = require('../utils/themes');
const { task, copyTask } = require('../utils/gulp-utils');
const workspace = require('../utils/workspace');
Expand Down Expand Up @@ -51,6 +51,13 @@ function getComponentsExports() {
result[`./${component}`] = `./${component}/index.js`;
}

// Versioned beta components, published only at their explicit subpath (e.g.
// `@cloudscape-design/components/beta/basic-table-0.1`) — the versioning escape-hatch. Not added
// to the top-level barrel.
for (const betaItem of listBetaItems('src')) {
result[`./${betaItem}`] = `./${betaItem}/index.js`;
}

// Per-component test-utils DOM wrappers (e.g. `.../test-utils/dom/button`).
for (const component of listPublicItems('src/test-utils/dom')) {
result[`./test-utils/dom/${component}`] = `./test-utils/dom/${component}/index.js`;
Expand Down
21 changes: 19 additions & 2 deletions build-tools/utils/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,40 @@
}

function listPublicItems(baseDir) {
return fs

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`

Check failure on line 12 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Replace `⏎····.readdirSync(baseDir)⏎····` with `.readdirSync(baseDir)`
.readdirSync(baseDir)
.filter(
elem =>

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Replace `······` with `····`

Check failure on line 15 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Replace `······` with `····`
!elem.startsWith('__') &&

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Delete `··`

Check failure on line 16 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Delete `··`
!elem.startsWith('.') &&

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Delete `··`

Check failure on line 17 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Delete `··`
elem !== 'internal' &&

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Delete `··`

Check failure on line 18 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Delete `··`
elem !== 'types' &&

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Delete `··`

Check failure on line 19 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Delete `··`
elem !== 'index.tsx' &&

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Replace `········` with `······`

Check failure on line 20 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Replace `········` with `······`
elem !== 'index.ts' &&

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Delete `··`

Check failure on line 21 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Delete `··`
elem !== 'interfaces.ts' &&

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Replace `········` with `······`

Check failure on line 22 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Replace `········` with `······`
elem !== 'test-utils' &&

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / build / build

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 1/4)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 3/4)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Build components (React 18)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 4/4)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 3/4)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (3/6)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 16, shard 2/4)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (5/6)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (6/6)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 1/4)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 2/4)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (2/6)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components accessibility tests shards (1/6)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components integration tests shards (React 18, shard 4/4)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 18)

Delete `··`

Check failure on line 23 in build-tools/utils/files.js

View workflow job for this annotation

GitHub Actions / dry-run / Components motion tests (React 16)

Delete `··`
elem !== 'i18n' &&
elem !== 'theming' &&
elem !== 'plugins' &&
elem !== 'contexts'
elem !== 'contexts' &&
// `beta` is not a component: it is a container for versioned, opt-in beta components
// (e.g. `beta/basic-table-0.1`) enumerated separately via `listBetaItems`.
elem !== 'beta'
);
}

module.exports = { writeFile, listPublicItems };
// Lists the versioned beta components as `beta/<name>` (e.g. `beta/basic-table-0.1`). Beta components
// are opt-in and published only at their versioned export subpath — they are intentionally excluded
// from the top-level barrel and treated as their own kind of public item elsewhere in the build.
function listBetaItems(srcDir = 'src') {
const betaDir = path.join(srcDir, 'beta');
if (!fs.existsSync(betaDir)) {
return [];
}
return fs
.readdirSync(betaDir)
.filter(elem => !elem.startsWith('__') && !elem.startsWith('.') && fs.statSync(path.join(betaDir, elem)).isDirectory())
.map(elem => `beta/${elem}`);
}

module.exports = { writeFile, listPublicItems, listBetaItems };
1 change: 1 addition & 0 deletions build-tools/utils/pluralize.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const pluralizationMap = {
Autosuggest: 'Autosuggests',
Badge: 'Badges',
BarChart: 'BarCharts',
BasicTable: 'BasicTables',
Box: 'Boxes',
BreadcrumbGroup: 'BreadcrumbGroups',
Button: 'Buttons',
Expand Down
141 changes: 141 additions & 0 deletions src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -37687,6 +37687,84 @@ Options get highlighted when they match the value of the input field.",
],
"name": "BarChartWrapper",
},
{
"methods": [
{
"name": "findColumnHeaders",
"parameters": [],
"returnType": {
"isNullable": false,
"name": "Array",
"typeArguments": [
{
"name": "ElementWrapper<HTMLElement>",
},
],
},
},
{
"name": "findHeaderRow",
"parameters": [],
"returnType": {
"isNullable": true,
"name": "ElementWrapper",
"typeArguments": [
{
"name": "HTMLElement",
},
],
},
},
{
"name": "findLoadingText",
"parameters": [],
"returnType": {
"isNullable": true,
"name": "ElementWrapper",
"typeArguments": [
{
"name": "HTMLElement",
},
],
},
},
{
"name": "findRowByIndex",
"parameters": [
{
"flags": {
"isOptional": false,
},
"name": "index",
"typeName": "number",
},
],
"returnType": {
"isNullable": true,
"name": "ElementWrapper",
"typeArguments": [
{
"name": "HTMLElement",
},
],
},
},
{
"name": "findRows",
"parameters": [],
"returnType": {
"isNullable": false,
"name": "Array",
"typeArguments": [
{
"name": "ElementWrapper<HTMLElement>",
},
],
},
},
],
"name": "BasicTableWrapper",
},
{
"methods": [],
"name": "BoxWrapper",
Expand Down Expand Up @@ -49495,6 +49573,69 @@ Options get highlighted when they match the value of the input field.",
],
"name": "BarChartWrapper",
},
{
"methods": [
{
"name": "findColumnHeaders",
"parameters": [],
"returnType": {
"isNullable": false,
"name": "MultiElementWrapper",
"typeArguments": [
{
"name": "ElementWrapper",
},
],
},
},
{
"name": "findHeaderRow",
"parameters": [],
"returnType": {
"isNullable": false,
"name": "ElementWrapper",
},
},
{
"name": "findLoadingText",
"parameters": [],
"returnType": {
"isNullable": false,
"name": "ElementWrapper",
},
},
{
"name": "findRowByIndex",
"parameters": [
{
"flags": {
"isOptional": false,
},
"name": "index",
"typeName": "number",
},
],
"returnType": {
"isNullable": false,
"name": "ElementWrapper",
},
},
{
"name": "findRows",
"parameters": [],
"returnType": {
"isNullable": false,
"name": "MultiElementWrapper",
"typeArguments": [
{
"name": "ElementWrapper",
},
],
},
},
],
"name": "BasicTableWrapper",
},
{
"methods": [],
"name": "BoxWrapper",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ exports[`test-utils selectors 1`] = `
"bar-chart": [
"awsui_root_1gfe1",
],
"beta": [
"awsui_body_e1x3z",
"awsui_header-cell_e1x3z",
"awsui_header-row_e1x3z",
"awsui_loading_e1x3z",
"awsui_root_e1x3z",
"awsui_row_e1x3z",
],
"box": [
"awsui_root_18wu0",
],
Expand Down
Loading
Loading