Skip to content

fix(importer): unbreak @repo/crawlers build and make it consumable from Rate-Services - #105

Merged
JOY (JOY) merged 2 commits into
devfrom
claude/laughing-keller-9jsp5v
Oct 16, 2026
Merged

JOY (JOY) merged 2 commits into
devfrom
claude/laughing-keller-9jsp5v

Conversation

@JOY

@JOY JOY (JOY) commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • What changed?
    • FlagshipDeviceSeed: expert_review_summary / expert_criteria_scores are now optional.
    • apps/importer/tsconfig.json: rootDir: ./src + declaration: true.
    • apps/importer/package.json: types + exports for ., ./shopee/arena-spec-syncer and ./shopee/flagship-seed-data. The subpaths are explicit on purpose: a ./shopee/* wildcard would also expose test-ai-enricher, test-review-analyzer and run-ingestion-test, which execute on import.
  • Why?

Fixes #103

Checklist

  • Build passes: @repo/shared-data, @repo/crawlers, @repo/extension, @repo/web (Next.js 16)
  • Type-check passes: pnpm --filter @repo/web typecheck
  • Lint passes: not run
  • Tests pass: @repo/crawlers test, @repo/extension test, @repo/web test
  • Docs updated: n/a
  • No breaking API changes (nothing imported @repo/crawlers as a package before; smoke-tested the three export paths, and confirmed @repo/crawlers/shopee/test-ai-enricher is blocked with ERR_PACKAGE_PATH_NOT_EXPORTED)

Notes

  • Affected areas: apps/importer only
  • Follow-up: DOS/Rate-Services will consume this through a DOS/Rate submodule and delete its copies (DOS/Rate-Services#14).

🤖 Generated with Claude Code

https://claude.ai/code/session_01SJ8kEoAgmss5ZwS8ziunTj

…ixes #103)

- FlagshipDeviceSeed: make expert_review_summary / expert_criteria_scores
  optional. The 8 seeds added in 310ef3d have no expert write-up and broke
  `pnpm --filter @repo/crawlers build` (TS2739), turning dev CI red. The
  matching master_products columns are nullable.
- tsconfig: rootDir ./src + declaration, so dist/index.js actually exists
  (main pointed at a file that was emitted as dist/src/index.js) and
  consumers get .d.ts types.
- package.json: add types and exports ("." and "./shopee/*") so
  DOS/Rate-Services can import the engine instead of keeping copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SJ8kEoAgmss5ZwS8ziunTj
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5692cf9f-c153-44bd-8253-0cee61f8b825
📥 Commits

Reviewing files that changed from the base of the PR and between d55faa9 and 59bf038.

📒 Files selected for processing: 3
  • apps/importer/package.json
  • apps/importer/src/shopee/flagship-seed-data.ts
  • apps/importer/tsconfig.json
+---------------------------------------+
| Execute order 66...to purge the bugs. |
+---------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The wildcard also exposed test-ai-enricher, test-review-analyzer and
run-ingestion-test, which execute on import. Only export the two
library modules Rate-Services needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SJ8kEoAgmss5ZwS8ziunTj
@JOY
JOY (JOY) merged commit 94a2a2b into dev Oct 16, 2026
5 of 6 checks passed
JOY (JOY) pushed a commit that referenced this pull request Oct 16, 2026
…vices

Follow-up to #105 / DOS/Rate-Services#15, which made Rate-Services
consume the engine through the vendor/rate submodule.

- Add `test:dist`, a smoke test that imports @repo/crawlers (root,
  ./shopee/arena-spec-syncer, ./shopee/flagship-seed-data) and
  @repo/shared-data by package name from the built dist, checks the
  .d.ts files, and asserts that the test scripts that execute on
  import stay unexported. Run it in CI after the crawler tests.
- AGENTS.md / CLAUDE.md: document that Rate-Services consumes the
  engine via the submodule and must not copy engine files, and replace
  the stale `npm run build` Rate-Services commands with the pnpm ones.
- ROADMAP: record the change as 5.19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
JOY (JOY) pushed a commit that referenced this pull request Oct 16, 2026
Cover the .d.ts behind the ./shopee/flagship-seed-data export, and
credit #105 / #107 separately in ROADMAP 5.19 (review follow-up).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
JOY (JOY) added a commit that referenced this pull request Oct 16, 2026
…vices (#107)

- Add `test:dist`, a smoke test that imports @repo/crawlers (root, ./shopee/arena-spec-syncer, ./shopee/flagship-seed-data) and @repo/shared-data by package name from the built dist, checks the .d.ts files, and asserts that the test scripts that execute on import stay unexported. Run it in CI after the crawler tests.
- AGENTS.md / CLAUDE.md: document that Rate-Services consumes the engine via the vendor/rate submodule and must not copy engine files; replace the stale `npm run build` Rate-Services commands with the pnpm ones.
- ROADMAP: record the change as 5.19.

Follow-up to #103 / #105 and DOS/Rate-Services#15.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(importer): make @repo/crawlers the single source of truth for Rate-Services

2 participants