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
2 changes: 1 addition & 1 deletion fixtures/consumer-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"smoke": "node smoke-test.mjs"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@tabler/icons-react": "^3.41.1",
"classnames": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion fixtures/consumer-file-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"assert": "node ../shared/assert-static-graph.mjs --dist dist --require ag-grid-community,ag-grid-react --forbidden @monaco-editor/react,monaco-editor,@uiw/react-md-editor,@uiw/react-markdown-preview"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@tabler/icons-react": "^3.41.1",
"classnames": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion fixtures/consumer-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"smoke": "node smoke-test.mjs"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@tabler/icons-react": "^3.41.1",
"classnames": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion fixtures/consumer-json-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"assert": "node ../shared/assert-static-graph.mjs --dist dist --forbidden ag-grid-community,ag-grid-react,@uiw/react-md-editor,@uiw/react-markdown-preview --dynamic-require @monaco-editor/react,monaco-editor"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@monaco-editor/react": "^4.7.0",
"@tabler/icons-react": "^3.41.1",
Expand Down
2 changes: 1 addition & 1 deletion fixtures/consumer-markdown-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"assert": "node ../shared/assert-static-graph.mjs --dist dist --forbidden ag-grid-community,ag-grid-react,@monaco-editor/react,monaco-editor,@uiw/react-md-editor,@uiw/react-markdown-preview --dynamic-require @uiw/react-md-editor,@uiw/react-markdown-preview,@monaco-editor/react,monaco-editor"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@monaco-editor/react": "^4.7.0",
"@tabler/icons-react": "^3.41.1",
Expand Down
2 changes: 1 addition & 1 deletion fixtures/consumer-mixed-grid-editor-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"smoke": "node smoke-test.mjs"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@tabler/icons-react": "^3.41.1",
"classnames": "^2.5.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"smoke": "node smoke-test.mjs"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@tabler/icons-react": "^3.41.1",
"classnames": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion fixtures/consumer-mixed-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"smoke": "node smoke-test.mjs"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@tabler/icons-react": "^3.41.1",
"classnames": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion fixtures/consumer-schema-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"assert": "node ../shared/assert-static-graph.mjs --dist dist --forbidden ag-grid-community,ag-grid-react,@uiw/react-md-editor,@uiw/react-markdown-preview,@monaco-editor/react,monaco-editor --dynamic-require @monaco-editor/react,monaco-editor --dynamic-after SchemaAdditionalPropertiesEditor:monaco-editor"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@monaco-editor/react": "^4.7.0",
"@tabler/icons-react": "^3.41.1",
Expand Down
2 changes: 1 addition & 1 deletion fixtures/consumer-subpaths/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test:cjs": "node cjs.cjs"
},
"dependencies": {
"@epam/ai-dial-ui-kit": "file:../.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz",
"@epam/ai-dial-ui-kit": "file:../.tarballs/ai-dial-ui-kit.tgz",
"@floating-ui/react": "^0.27.19",
"@modelcontextprotocol/sdk": "^1.29.0",
"@monaco-editor/react": "^4.7.0",
Expand Down
26 changes: 25 additions & 1 deletion fixtures/run-all.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
mkdirSync,
readFileSync,
readdirSync,
renameSync,
rmSync,
} from 'node:fs';
import { dirname, join, resolve as resolvePath } from 'node:path';
Expand All @@ -24,6 +25,18 @@ const fixturesDir = dirname(fileURLToPath(import.meta.url));
const repoRoot = resolvePath(fixturesDir, '..');
const npmExecPath = process.env.npm_execpath;

/*
* `npm pack` names its output after `package.json#version`, and it cannot be
* told otherwise — so the filename is `…-0.0.0.tgz` on `development` and
* `…-0.14.0.tgz` on `release-0.14`. A fixture cannot pin a filename that
* moves with the branch: every one of them pinned the `0.0.0` spelling, so on
* a release branch all ten failed to install with `ENOENT` and this suite
* reported ten regressions that were really one wrong path. The packed
* artifact is therefore renamed to this one canonical, version-free name,
* which is what the fixtures pin.
*/
const CANONICAL_TARBALL = 'ai-dial-ui-kit.tgz';

const runNpm = (args, cwd) => {
if (npmExecPath) {
execFileSync(process.execPath, [npmExecPath, ...args], {
Expand Down Expand Up @@ -64,6 +77,17 @@ const main = () => {
mkdirSync(tarballDir, { recursive: true });
runNpm(['pack', '--pack-destination', tarballDir], repoRoot);

const packed = readdirSync(tarballDir).filter((f) => f.endsWith('.tgz'));
if (packed.length !== 1) {
throw new Error(
`Expected exactly one packed tarball in ${tarballDir}, found ${
packed.length === 0 ? 'none' : packed.join(', ')
}`,
);
}
renameSync(join(tarballDir, packed[0]), join(tarballDir, CANONICAL_TARBALL));
console.log(`Packed ${packed[0]} as ${CANONICAL_TARBALL}`);

const results = [];
for (const name of listFixtureDirs()) {
const dir = join(fixturesDir, name);
Expand All @@ -74,7 +98,7 @@ const main = () => {

console.log(`\n=== ${name} ===`);
try {
// The tarball is rebuilt under the same versioned filename on every
// The tarball is rebuilt under the same canonical filename on every
// run. Remove the generated lockfile (which pins the old tarball's
// integrity) and the installed package itself. Keeping unrelated,
// already-valid dependencies makes local re-runs fast; a clean CI
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"test:run": "vitest run",
"verify:agent-hook": "npm run typecheck && npm run lint:check && npm run test:run",
"fixtures:run-all": "node fixtures/run-all.mjs",
"verify:distribution": "npm run fixtures:run-all && node tools/export-surface.mjs --check tools/baselines/root-exports.json && node tools/export-surface.mjs --verify-against-baseline tools/baselines/root-exports.json --from-tarball fixtures/.tarballs/epam-ai-dial-ui-kit-0.0.0.tgz && node tools/verify-pack-contents.mjs",
"verify:distribution": "npm run fixtures:run-all && node tools/export-surface.mjs --check tools/baselines/root-exports.json && node tools/export-surface.mjs --verify-against-baseline tools/baselines/root-exports.json --from-tarball fixtures/.tarballs/ai-dial-ui-kit.tgz && node tools/verify-pack-contents.mjs",
"format": "prettier --check .",
"format-fix": "prettier --write .",
"preview": "vite preview",
Expand Down
Loading