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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"verify:components": "node --test tests/component-entries.test.mjs && playwright test --config playwright.components.config.ts",
"verify:auth:test": "pnpm --filter @devslab/dds-react... run build && pnpm --filter @devslab-kr/dds-auth run check && pnpm --filter @devslab-kr/dds-auth run test",
"verify:auth:browser": "pnpm --filter @devslab-kr/dds-auth run build && playwright test --config playwright.auth.config.ts",
"verify:auth:release": "pnpm --filter @devslab-kr/dds-auth run build && pnpm --filter @devslab-kr/dds-auth run verify:consumer",
"verify:auth:release": "pnpm --filter @devslab-kr/dds-auth... run build && pnpm --filter @devslab-kr/dds-auth run verify:consumer",
"verify:vue:test": "pnpm --filter @devslab/dds-vue run check && pnpm --filter @devslab/dds-vue run test",
"verify:vue:release": "pnpm --filter @devslab/dds-vue run build && node scripts/verify-vue-release.mjs",
"verify:table-vue:test": "pnpm --filter @devslab/dds-table-vue run check && pnpm --filter @devslab/dds-table-vue run test",
Expand Down
2 changes: 1 addition & 1 deletion packages/dds-auth/README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ Next.js 앱의 서버 조회/변경은 TanStack Query, 업무 입력·동의 폼

## 검증

패키지 `test`/`check`/`build`는 계약과 실제 사용자 동작을 검사합니다. `verify:consumer`는 추적되는 consumer fixture 안에 pack/install하고 공개 DDS 0.29.2 고정 소비, 타입, Node/worker import, 브라우저 없는 SSR, hydration DOM 유지와 오류 동작을 확인합니다. 임시 프로젝트를 만들지 않습니다. Playwright `playwright.auth.config.ts`는 `/login.html`의 명시적 어댑터 시뮬레이션에서 키보드·복구·로딩·설정 누락·반응형·양 테마·긴 문구·공식 자산·axe를 검사합니다. 실제 제공자 로그인이나 운영 콘솔 준비 완료 검증과 구분합니다.
패키지 `test`/`check`/`build`는 계약과 실제 사용자 동작을 검사합니다. 저장소 루트에서 `pnpm verify:auth:release`를 실행하면 Auth, DDS React와 그 DDS 의존성을 함께 빌드해 tarball로 만듭니다. 저장소의 `consumer` 테스트 앱은 이 tarball을 설치해 타입, Node/worker import, 브라우저 없는 SSR, hydration DOM 유지와 오류 동작을 확인합니다. Playwright `playwright.auth.config.ts`는 `/login.html`의 명시적 어댑터 시뮬레이션에서 키보드·복구·로딩·설정 누락·반응형·양 테마·긴 문구·공식 자산·axe를 검사합니다. 실제 제공자 로그인이나 운영 콘솔 준비 완료 검증과 구분합니다.
2 changes: 1 addition & 1 deletion packages/dds-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ In Next.js consumers, Query owns provider/session queries and mutation orchestra

Taste review kept the existing title, provider list and legal link hierarchy. Polish checks the same icon slot across verified marks, legible marks in both themes, narrow widths, readable labels, keyboard focus, disabled buttons and unchanged accessible names. This component stays inside the product's existing sign-in layout.

`pnpm --filter @devslab-kr/dds-auth test`, `check`, `build` cover contracts and user behavior. `verify:consumer` packs and installs into the tracked reusable `consumer` fixture, pins stable public DDS 0.29.2, checks types, Node/worker import, browser-free SSR and hydration identity. It creates no temporary project. `pnpm exec playwright test --config playwright.auth.config.ts` covers the explicit adapter simulation at `/login.html`: keyboard/recovery/loading/unconfigured states, desktop/tablet/mobile, both themes, long copy, real asset loading and axe. No test authenticates a real provider or proves production console readiness.
`pnpm --filter @devslab-kr/dds-auth test`, `check`, `build` cover contracts and user behavior. Run `pnpm verify:auth:release` from the repository root to build and pack Auth, DDS React and its DDS dependencies together. The tracked `consumer` fixture installs the tarballs and checks types, Node/worker imports, browser-free SSR and hydration identity. `pnpm exec playwright test --config playwright.auth.config.ts` covers the explicit adapter simulation at `/login.html`: keyboard/recovery/loading/unconfigured states, desktop/tablet/mobile, both themes, long copy, real asset loading and axe. No test authenticates a real provider or proves production console readiness.
1 change: 0 additions & 1 deletion packages/dds-auth/consumer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"private": true,
"type": "module",
"dependencies": {
"@devslab/dds-react": "0.36.0",
"react": "19.3.0",
"react-dom": "19.3.0",
"jsdom": "30.0.1",
Expand Down
65 changes: 41 additions & 24 deletions packages/dds-auth/consumer/verify.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import assert from "node:assert/strict";
import { readFile, access, rm } from "node:fs/promises";
import { readFile, access, mkdir, rm } from "node:fs/promises";
import { spawnSync } from "node:child_process";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";

// A reusable, tracked fixture; no mkdtemp, scratch project or worktree is created.
const consumer = dirname(fileURLToPath(import.meta.url));
const root = resolve(consumer, "..");
const packages = resolve(consumer, "../..");
const packDirectory = join(consumer, ".verify-tarballs");
const nodeModules = join(dirname(process.execPath), "node_modules");
function run(command, args, cwd = consumer) {
const result = spawnSync(command, args, {
Expand All @@ -28,33 +28,53 @@ const npm = (args) =>
? [join(nodeModules, "npm/bin/npm-cli.js"), ...args]
: args,
);
const manifest = JSON.parse(await readFile(join(root, "package.json"), "utf8"));
const tarball = join(
consumer,
`${manifest.name.replace(/^@/, "").replace("/", "-")}-${manifest.version}.tgz`,
);
run(
process.platform === "win32" ? process.execPath : "pnpm",
const pnpmPrefix =
process.platform === "win32"
? [
join(nodeModules, "corepack/dist/pnpm.js"),
"pack",
"--pack-destination",
consumer,
]
: ["pack", "--pack-destination", consumer],
root,
);
? [join(nodeModules, "corepack/dist/pnpm.js")]
: [];

// Acquire the tracked fixture exclusively before touching its shared node_modules.
await mkdir(packDirectory);
try {
const candidates = [];
for (const directory of [
"dds-tokens",
"dds-css",
"dds-icons",
"dds-react",
"dds-auth",
]) {
const packageRoot = join(packages, directory);
const { name, version } = JSON.parse(
await readFile(join(packageRoot, "package.json"), "utf8"),
);
run(
process.platform === "win32" ? process.execPath : "pnpm",
[...pnpmPrefix, "pack", "--pack-destination", packDirectory],
packageRoot,
);
const filename = `${name.replace(/^@/, "").replace("/", "-")}-${version}.tgz`;
candidates.push({ name, version, tarball: join(packDirectory, filename) });
}
npm([
"install",
"--ignore-scripts",
"--no-audit",
"--no-fund",
"--no-save",
"--package-lock=false",
tarball,
...candidates.map(({ tarball }) => tarball),
]);
for (const { name, version } of candidates) {
const path = join(consumer, "node_modules", name, "package.json");
const packed = JSON.parse(await readFile(path, "utf8"));
assert.equal(packed.name, name);
assert.equal(
packed.version,
version,
`Expected the packed candidate for ${name}`,
);
}
const installed = join(consumer, "node_modules/@devslab-kr/dds-auth");
assert.ok(
installed.startsWith(`${consumer}/`) ||
Expand Down Expand Up @@ -89,8 +109,6 @@ try {
const packed = JSON.parse(
await readFile(join(installed, "package.json"), "utf8"),
);
assert.equal(packed.name, "@devslab-kr/dds-auth");
assert.equal(packed.version, manifest.version);
assert.equal(
packed.dependencies,
undefined,
Expand All @@ -113,6 +131,5 @@ try {
]);
run(process.execPath, ["runtime.mjs"]);
} finally {
// This exact tarball is produced by this invocation; the permanent fixture and dependencies remain reusable.
await rm(tarball, { force: true });
await rm(packDirectory, { recursive: true, force: true });
}