Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
c628a2e
Add picasso design patterns CI check (#4956)
denieler May 20, 2026
58aee4a
Fix claude_code_oauth_token in GHA workflow (#4969)
denieler May 20, 2026
9398379
Log design-patterns report and comment on PR failures (#4970)
denieler May 20, 2026
afc6137
Fix design-patterns PR comment and surface report in failing step (#4…
denieler May 20, 2026
440f217
[PF-2031] Upgrade TypeScript to 5.5 and align davinci tooling (#4963)
dulishkovych May 21, 2026
ae070fe
[PF-2031] Cut picasso-provider → picasso-notification source-import c…
dulishkovych May 21, 2026
c7651bd
Use workspace protocol for internal deps to fix release versioning (#…
dulishkovych May 22, 2026
db17e35
Version Packages (#4973)
github-actions[bot] May 22, 2026
fc2c4e7
Fix release: regenerate lockfile on version, sync stale peer specifie…
dulishkovych May 22, 2026
f55a1a2
Add basic CLAUDE.md (#4979)
denieler May 27, 2026
2138467
[PF-2096] Toggle input reset visibility
DaveHellsmith May 28, 2026
7c2aa7c
Merge pull request #4984 from toptal/pf-2096-input-persistent-reset
DaveHellsmith May 28, 2026
b6a6160
Version Packages
github-actions[bot] May 28, 2026
cb5930f
Merge pull request #4985 from toptal/changeset-release/master
DaveHellsmith May 28, 2026
7fa6b63
Add sub-pixel rule to AGENTS.md (#4991)
denieler Jun 1, 2026
463f8d9
[PF-2129] Bump nx to v22 (#5000)
azebich Jun 15, 2026
b5c3dec
[PF-2133] Move pnpm config to pnpm-workspace.yaml (#5014)
azebich Jun 19, 2026
c40f4aa
[FF-125] Widen Link and Typography `as` prop to ElementType (#5021)
OleksandrNechai Jun 25, 2026
41e9cae
Version Packages (#5022)
github-actions[bot] Jun 25, 2026
fa4206f
Planning docs
vedrani Apr 28, 2026
551f5a4
Planning docs
vedrani Apr 30, 2026
4b3c749
Planning docs
vedrani May 4, 2026
81d14f2
Orchestrator
vedrani May 5, 2026
38b15ce
Orchestrator fix
vedrani May 5, 2026
3b29cd5
Orchestrator fix #2
vedrani May 5, 2026
9b53b7e
Orchestrator fix #3
vedrani May 6, 2026
938b093
Orchestrator fix #4
vedrani May 6, 2026
312c890
Orchestrator fix #5
vedrani May 6, 2026
6984aa6
Orchestrator fix #6
vedrani May 6, 2026
3767585
Orchestrator fix #8
vedrani May 6, 2026
1268d7a
Orchestrator fix #9
vedrani May 6, 2026
68614db
Orchestrator fix #10
vedrani May 6, 2026
97f6cc5
Orchestrator tier1.phase3
vedrani May 6, 2026
4df36f8
Orchestrator fix #1
vedrani May 6, 2026
71960ee
Orchestrator phase3.5
vedrani May 6, 2026
94722fa
Orchestrator fix #1
vedrani May 6, 2026
5271846
Orchestrator fix #2
vedrani May 6, 2026
676ac55
Orchestrator fix #2
vedrani May 6, 2026
2972dcf
Orchestrator Tier.2
vedrani May 6, 2026
93f812c
Orchestrator v4
vedrani May 7, 2026
40a53d9
Orchestrator fix #1
vedrani May 7, 2026
93c5bc6
Orchestrator fix #2
vedrani May 7, 2026
8580b6b
Orchestrator fix #3
vedrani May 7, 2026
dc138e4
Orchestrator fix #4
vedrani May 7, 2026
8e76ce4
Orchestrator fix #5
vedrani May 7, 2026
87c2fb0
Orchestrator fix #5
vedrani May 7, 2026
e832bb4
Orchestrator fix #6
vedrani May 7, 2026
1adc374
Orchestrator fix #7
vedrani May 7, 2026
d3deaab
Orchestrator fix #8
vedrani May 7, 2026
c596c56
Orchestrator fix #9
vedrani May 7, 2026
0b5e166
Orchestrator fix #10
vedrani May 8, 2026
99bd6c8
Orchestrator security + classes
vedrani May 11, 2026
3c68e9a
Orchestrator review-sweep fix#1
vedrani May 11, 2026
9117598
Migrate orchestrator to pnpm
vedrani May 11, 2026
14ffd90
Migrate orchestrator to pnpm
vedrani May 11, 2026
3dbd7ee
Add playwright mcp
vedrani May 12, 2026
0d49194
Add playwright mcp
vedrani May 12, 2026
0ee059f
Details
vedrani May 12, 2026
519c189
Fix storybook
vedrani May 12, 2026
cd469ee
Fix review-sweep
vedrani May 12, 2026
ae22910
Fix regex
vedrani May 12, 2026
39e427c
Add working-base
vedrani May 12, 2026
9d0cf72
Fix danger
vedrani May 12, 2026
a3552a5
Add changeset prompt
vedrani May 12, 2026
7fd239a
Move pnpm settings
vedrani May 13, 2026
313456e
Fix prompts
vedrani May 13, 2026
ff82f54
Rework visual inspection
vedrani May 13, 2026
f3d1a4e
Rework visual inspection #2
vedrani May 13, 2026
31542e2
Small improvements
vedrani May 14, 2026
707f564
Improvements #1
vedrani May 14, 2026
b674551
Improvements #2
vedrani May 14, 2026
df84550
Improvements #3
vedrani May 14, 2026
988b3b1
Improve visual inspection #3
vedrani May 14, 2026
909ba5a
Improve visual inspection #4
vedrani May 14, 2026
098ba0c
Improve visual inspection #5
vedrani May 15, 2026
52ac047
Improve visual inspection #6
vedrani May 15, 2026
904ac90
Improve visual inspection #7
vedrani May 18, 2026
fdd77d4
Fix + progress
vedrani May 18, 2026
0f17cac
Fix + progress
vedrani May 18, 2026
691eb33
Fix + progress #2
vedrani May 18, 2026
c6ecc21
Add pixel-diff
vedrani May 18, 2026
e454ea8
Progress
vedrani May 18, 2026
e6633b4
Progress #2
vedrani May 18, 2026
ed7cc17
Fix snapshots
vedrani May 18, 2026
c46c36e
New improvements #1
vedrani May 20, 2026
2dd5465
Review, lessons and prompt gate added
vedrani May 20, 2026
1407c10
Improvements #1
vedrani May 21, 2026
21fbe5b
Rework prompts
vedrani May 21, 2026
90a5e43
Improvements #2
vedrani May 21, 2026
e3ab5c6
Improvements #3
vedrani May 21, 2026
0345350
Fix #1
vedrani May 22, 2026
ad52127
Fix #2
vedrani May 22, 2026
c821448
Fix #3
vedrani May 22, 2026
ba406f2
Fix #4
vedrani May 22, 2026
af47226
Model config
vedrani May 24, 2026
d9cc981
Update with base-ui rules and fixes
vedrani May 25, 2026
739cfc4
Manifest #1
vedrani May 25, 2026
dd47560
Update gitignore
vedrani May 25, 2026
779c8db
Add rules document for review
vedrani May 25, 2026
32437b9
Improvements #4
vedrani May 25, 2026
a320e08
Note migrated
vedrani May 26, 2026
dcaee5a
Fix
vedrani May 26, 2026
d08bd3e
Restructure base-ui rules and visual differences
vedrani May 26, 2026
f12ca30
Fix rules
vedrani May 27, 2026
63962aa
Typography manifest
vedrani May 28, 2026
3374bbc
Add onChange helper and rules
vedrani May 28, 2026
a38e520
Update to Opus 4.8
vedrani May 28, 2026
caca319
Fix
vedrani May 28, 2026
e6716b0
Add ...rest rule
vedrani May 29, 2026
5c96558
Add cleaning of phantom files
vedrani May 29, 2026
ffd19df
Fix #1
vedrani May 29, 2026
137b751
Fixes
vedrani May 30, 2026
913367d
Manifest progress
vedrani Jun 1, 2026
781f761
Improve rules and review
vedrani Jun 2, 2026
2808517
Update orchestrator rules
vedrani Jun 3, 2026
a937b94
Fix #1
vedrani Jun 4, 2026
3151680
Fix #2
vedrani Jun 4, 2026
efebdbf
Fix #3
vedrani Jun 4, 2026
d876a1f
Fix #4
vedrani Jun 4, 2026
d30aa80
Progress #1
vedrani Jun 5, 2026
0eba95a
Improvements #1
vedrani Jun 8, 2026
7676263
Improvements #2
vedrani Jun 9, 2026
fc5b3d2
Consolidate agents.md #1
vedrani Jun 9, 2026
8dbab9c
Add cypress happo to gate
vedrani Jun 10, 2026
ce64ee6
Move to Fable 5
vedrani Jun 10, 2026
8369853
Add instructions
vedrani Jun 10, 2026
e654f90
Fix happo
vedrani Jun 11, 2026
d5af547
Update manifest
vedrani Jun 11, 2026
bf27b6c
Fix migration bug
vedrani Jun 12, 2026
527183c
Record Tooltip v1/v2 run state + audit notes (#5007)
dulishkovych Jun 15, 2026
18efd7d
Record Dropdown v2 run state (PR #5008)
dulishkovych Jun 15, 2026
61ddded
Fix + Progress
vedrani Jun 17, 2026
28d3e40
Fix cleanup bug
vedrani Jun 17, 2026
c51219c
Progress + graduation
vedrani Jun 17, 2026
0613836
Progress
vedrani Jun 18, 2026
f00f540
Update leasson-learned + manifest (#5017)
azebich Jun 23, 2026
5e97c4a
[PF-1992] Update manifest.json (#5023)
azebich Jun 29, 2026
33bc3f2
Add --audit-pr mode + externalize audit checklist + enforcement tiers
vedrani Jun 29, 2026
8261b70
Restore webpack patch and drop vestigial Utils dep post-rebase
vedrani Jun 29, 2026
3d6f02d
Record Tooltip v2 review-sweep state (reviewed 2026-07-06)
dulishkovych Jul 6, 2026
22347c4
Record Tooltip v2 review-sweep state (reviewed 2026-07-06 09:52)
dulishkovych Jul 6, 2026
f3aaca1
[PF-1992] Update manifest.json (#5038)
azebich Jul 8, 2026
b016566
Stamp cleanup_done_at for Tooltip:v2 (PR #5005)
dulishkovych Jul 9, 2026
59295e2
[PF-1994] Mark Tooltip migration merged in manifest (#5043)
dulishkovych Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .changeset/picasso-shared-react-event-helpers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@toptal/picasso-shared': minor
---

### picasso-shared

- add `toReactEvent<R>(event)` boundary-cast helper for bridging native DOM `Event` to React.SyntheticEvent variants at the `@base-ui/react` ↔ Picasso form-component interface. Proxy-based: preserves native event identity, synthesizes the four React-SyntheticEvent shim methods (`nativeEvent`, `persist`, `isDefaultPrevented`, `isPropagationStopped`).
- add `toReactChangeEvent<T>(event)` specialized helper for form-input `onChange` adapters. Constrains `T` to `HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement` and dev-warns when the event target is not a DOM element. Delegates to `toReactEvent` for the Proxy machinery.
20 changes: 20 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"permissions": {
"allow": [
"Bash(pnpm davinci-syntax *)",
"Bash(pnpm davinci-qa *)",
"Bash(pnpm eslint *)",
"Bash(pnpm exec tsc --noEmit *)",
"Bash(pnpm typecheck *)",
"Bash(gh search *)",
"Bash(bash -n *)",
"Bash(pnpm tsc --noEmit *)",
"Bash(pnpm changeset status)",
"Bash(pnpm changeset status *)",
"mcp__playwright__browser_navigate",
"mcp__playwright__browser_snapshot",
"mcp__playwright__browser_console_messages",
"mcp__playwright__browser_take_screenshot"
]
}
}
47 changes: 47 additions & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Picasso migration orchestrator — environment template.
#
# Copy to `.envrc` (repo root, gitignored) OR `~/Projects/.envrc`, fill in,
# then run `direnv allow`. The orchestrator's loadEnvrcUpwards() walks up from
# the repo and auto-loads the nearest .envrc via direnv.
#
# No direnv? Either `source` this file before `pnpm orchestrate`, or pass the
# vars inline: HAPPO_API_KEY=… HAPPO_API_SECRET=… pnpm orchestrate --component=Note
#
# NOTE: claude / gh / ssh auth are NOT set here — they're CLI/agent-managed.
# See docs/migration/ORCHESTRATOR.md §"First-time setup".
# Verify your whole setup at once with: pnpm orchestrate --component=<X> --dry-run
# (reads the prerequisite report without starting a real run).

# --- Required for the Happo visual gate ---------------------------------
# Your personal Happo API credentials, with access to the Picasso Happo org
# (account 675). Get them from https://happo.io account settings.
# To run WITHOUT Happo instead, leave these unset and pass
# MIGRATION_GATE_HAPPO=skip (sandbox / smoke runs only).
export HAPPO_API_KEY=
export HAPPO_API_SECRET=

# --- Required for correct pnpm node_modules layout ----------------------
# Any value works (e.g. `dummy`) — only used to authenticate registry fetches,
# not for layout. Without it pnpm falls back to the isolated linker and tsc
# can't resolve React types.
export NPM_TOKEN=dummy

# --- Optional: model preset (fable | opus) ------------------------------
# Default: fable (current config — claude-fable-5[1m]). opus is claude-opus-4-8[1m]
# at the same effort, ≈half fable's per-token cost. Override per-run with
# `--preset=opus`; `--model` / `--effort` / `--thinking-tokens` override fields.
# export MIGRATION_MODEL_PRESET=fable

# --- Optional: gate / behavior knobs (env-only) -------------------------
# Defaults are sensible; uncomment to override per-clone (e.g. a sandbox clone
# that always skips the visual gate). Full list + effects:
# docs/migration/ORCHESTRATOR.md §"Environment knobs".
# export MIGRATION_GATE_HAPPO=skip # bypass Happo visual gate (sandbox/smoke)
# export MIGRATION_GATE_CHANGESET=skip # bypass changeset validation
# export MIGRATION_GATE_DOCTRINE=skip # bypass code-doctrine check
# export MIGRATION_GATE_HAPPO_CYPRESS_STRICT=1 # make Cypress visual diffs gate (default: advisory)
# export MIGRATION_GATE_HAPPO_CYPRESS=skip # disable the Cypress visual suite

# --- Optional: Confluence status sync (silently skipped if unset) -------
# export ATLASSIAN_EMAIL=
# export ATLASSIAN_API_TOKEN=
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ build
node_modules
!.changeset
.changeset/README.md
docs/migration
docs/modernization
bin
migration-runs
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ const generateSameSettingRules = (ruleNames, setting) => {
}

module.exports = {
// root: true stops ESLint from walking up the directory tree looking for
// ancestor configs. Required for `git worktree`-based dev flows
// (orchestrator's worktrees live under `migration-runs/<date>/<comp>/worktree/`,
// and without `root: true`, ESLint walks up from the worktree's source
// through `migration-runs/`, eventually re-discovering this same config in
// the main repo via a different filesystem path. That double-load registers
// `eslint-plugin-ssr-friendly` from two node_modules paths and fails with
// "ESLint couldn't determine the plugin uniquely". Fixed 2026-05-07.)
root: true,
extends: [
require.resolve('@toptal/davinci-syntax/src/configs/.eslintrc.cjs'),
'plugin:ssr-friendly/recommended',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/danger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Danger
on:
pull_request:
types: [opened, synchronize, reopened, edited, assigned, unassigned]
branches: [master]
branches: [master, 'feature/**']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
123 changes: 123 additions & 0 deletions .github/workflows/design-patterns-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Picasso Design Patterns Check

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write
issues: write
id-token: write

jobs:
design-patterns:
name: Picasso design patterns
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
with:
fetch-depth: 0

- name: Run Claude design-patterns review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
claude_args: '--allowed-tools "Bash(git diff:*),Bash(git fetch:*),Read,Write"'
prompt: |
You are reviewing this pull request against the Picasso component
library design-pattern rules. Follow these steps:

1. Read `./PICASSO_COMPONENT_DESIGN_PATTERNS.md`. It contains:
- Rules under `## Patterns` (apply to all components).
- Rules under `## Form components` (apply only to
form/field-style components: inputs, selects, checkboxes,
radios, date pickers, file uploaders, etc.). Label these
rules F1, F2, F3 in the table.
2. Run `git fetch --no-tags --depth=1 origin ${{ github.base_ref }}`
and then `git diff origin/${{ github.base_ref }}...HEAD --
'packages/**/*.tsx' 'packages/**/*.ts'
':(exclude)**/*.test.*' ':(exclude)**/*.spec.*'
':(exclude)**/*.stories.*'` to obtain the PR diff. Evaluate
ONLY the added/modified component code in that diff.
3. Skip rules that are not relevant to the diff. Skip the F-rules
for non-form components.
4. Write your review to `design-patterns-report.md` as a single
Markdown table — and ONLY that table. No preamble, no notes,
no summary, no surrounding prose.

Table format:

| Rule | Status |
| --- | --- |
| <id> — <short label> | :white_check_mark: OR :x: <short reason ≤ 20 words> |

- Use the rule's id followed by an em-dash and short label
(e.g., `1 — Optimize defaults for the common case`).
- One row per evaluated rule. Use `:white_check_mark:` for pass,
`:x: <reason>` for fail.
- If every evaluated rule passes, every row is
`:white_check_mark:`.

5. After writing the file, also output the exact same table as
your final message so it appears in the PR comment.

- name: Post report as PR comment on failure
if: always()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
MARKER: '<!-- picasso-design-patterns-report -->'
run: |
if [ ! -f design-patterns-report.md ]; then
echo "No report to post."
exit 0
fi
if ! grep -q ':x:' design-patterns-report.md; then
echo "All rules passed — skipping PR comment."
exit 0
fi
{
echo "$MARKER"
echo "### Picasso design patterns check failed"
echo ""
cat design-patterns-report.md
} > pr-comment.md

existing_ids=$(gh api --paginate "repos/$REPO/issues/$PR_NUMBER/comments" \
--jq "map(select(.body | contains(\"$MARKER\"))) | .[].id")

for id in $existing_ids; do
echo "Deleting previous comment $id."
gh api --method DELETE "repos/$REPO/issues/comments/$id"
done

echo "Creating new comment."
gh pr comment "$PR_NUMBER" --body-file pr-comment.md

- name: Check design patterns report
if: always()
run: |
if [ ! -f design-patterns-report.md ]; then
echo "No report produced — failing."
exit 1
fi
echo "===== Picasso design patterns report ====="
cat design-patterns-report.md
echo "=========================================="
if grep -q ':x:' design-patterns-report.md; then
echo "One or more design pattern rules failed. See the table above or the PR comment."
exit 1
fi
echo "All design pattern rules satisfied."
58 changes: 58 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,61 @@ reports
gha-creds-*.json

llm-docs

# Per-run artifacts emitted by bin/migration-orchestrator.ts (PF-1992).
# Worktrees, gate logs, diff reports, agent prompts/responses, escalation
# blocks. Reproducible per run; do not commit.
migration-runs

# Playwright MCP runtime artifacts emitted into the worktree when the
# orchestrator runs with `--with-mcp` (page snapshots, console logs, etc.).
# Captured by the agent for inspection during iter but should not land in
# the migration PR. Without this entry the agent's `git add -A` step
# (orchestrator-driven) sweeps them into the commit. See PR #4949 for the
# debris example.
.playwright-mcp

# Migration diagnostic scratch at the worktree root. The orchestrator's
# Happo-stalemate prompt (orchestrator-core.ts) tells the agent to save
# computed-style + thumb-position dumps under `migration-runs/<date>/
# <Component>/...` — which is the worktree's PARENT dir, NOT the worktree
# itself. Agents that don't expand the path correctly default to writing
# the file in CWD (= the worktree root = the repo root from git's view),
# which `git add -A` then sweeps into the PR. Reviewers consistently flag
# these as committed scratch files (PR #4955 Slider, PR #4965 Switch).
# These patterns are a defensive backstop alongside fixing the prompt.
/*-computed.json
/*-thumbs*.json
/after-fix-*.json
/baseline-*.json
/local-*.json
/local--*.png
/baseline--*.png
/scripts/diff-happo.js
**/__tests__/pixel-diff*.test.ts
# Flat scratch dir the Happo-stalemate prompt now points the agent at, plus the
# prefix-named computed-style dumps the old suffix globs above missed (the exact
# files reviewers flagged in PR #4965 Switch: `.scratch-pngdiff.py`,
# `computed-styles-local.json`). The orchestrator stray-guard also self-appends
# here when it strips a novel scratch file.
/.scratch/
/.scratch-*
/computed-styles-*.json
/.tmp-payload.json
/docs/migration/Button-diff.json
/patches/@base-ui__utils@0.2.8.patch
/computed-styles-local.json
/docs/migration/Switch-diff.json
/baseline--components-slider--slider--full-1280.png
/baseline--components-slider--slider--tooltip-section.png
/baseline--components-slider--slider.png
/local--components-slider--slider--default.png
/local--components-slider--slider--full-1280.png
/local--components-slider--slider--tooltip-section.png
/a11y-violation-1.png
/a11y-violation-2.png
/zoom-checked-diff.png
/zoom2.png
/zoom3.png
/zoom4.png
.claude/worktrees/
6 changes: 0 additions & 6 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

node-linker=hoisted
strict-peer-dependencies=false
auto-install-peers=true
link-workspace-packages=true
resolve-peers-from-workspace-root=true
22 changes: 22 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,28 @@ module.exports = {

const { reactDocgen, reactDocgenTypescriptOptions } = typescriptOptions

// Storybook's default rule for .(mjs|tsx?|jsx?) uses babel-loader with
// `exclude: /node_modules/`. That's correct for normal npm packages but
// wrong for `@toptal/picasso-*` workspace packages, which ship their
// `src/` directory alongside `dist-package/` in the published tarball.
// Picasso has at least one cross-package story import (Form's story
// pulls in FormLabel's story via `@toptal/picasso-form-label/src/...`)
// that resolves through node_modules into raw TypeScript source. Without
// babel applied, webpack tries to parse `import type` and fails with
// ModuleParseError. Narrow the exclude so workspace package sources go
// through babel even when resolved through node_modules.
const babelRule = config.module.rules.find(
rule => rule.test && rule.test.toString() === '/\\.(mjs|tsx?|jsx?)$/'
)

if (babelRule) {
babelRule.exclude = filePath =>
filePath.includes('/node_modules/') &&
!/[/\\]node_modules[/\\]@toptal[/\\]picasso-[^/\\]+[/\\]src[/\\]/.test(
filePath
)
}

const cssRule = config.module.rules.find(
rule => rule.test && rule.test.toString().includes('.css')
)
Expand Down
13 changes: 13 additions & 0 deletions .syncpackrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,18 @@
"prod",
"resolutions",
"local"
],
"versionGroups": [
{
"label": "internal packages reference each other via the workspace protocol",
"dependencies": [
"$LOCAL"
],
"dependencyTypes": [
"prod",
"dev"
],
"pinVersion": "workspace:*"
}
]
}
Loading
Loading