Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/vanilla-extract-migration #556

Merged
merged 192 commits into from
Aug 23, 2024
Merged

Conversation

Amiditin
Copy link
Member

Resolves #546

Copy link
Member

@TorinAsakura TorinAsakura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Жду фикс релиза

Copy link
Member

@Nelfimov Nelfimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

проверь последний ли "старый" у тебя бандл - ошибка в билде есть.

Иначе придется переводить на новый бандл, а там и линт и тайпчек ошибки...

ui/design/src/main.ts Outdated Show resolved Hide resolved
@Amiditin
Copy link
Member Author

Amiditin commented Aug 23, 2024

проверь последний ли "старый" у тебя бандл - ошибка в билде есть.

@Nelfimov версия бандла: 0.0.1-git.20240508.hash-0eb6cc8e, везде её использую

При билде, например @atls-ui-parts/layout, такая ошибка падает:

➤ YN0000: │   Error: The project root is ambiguous, but is required to resolve export map entry '.' in file 
➤ YN0000: │        '/home/amiditin/React/hyperion/.yarn/__virtual__/@atls-ui-parts-theme-virtual-642118c83a/1/ui-parts/theme/package.json'. Supply the `rootDir` compiler option to disambiguate.

Попробовал по разному прописать rootDir в tsconfig, не помогает

@Amiditin
Copy link
Member Author

@Nelfimov релиз убрали из чеков?

@Nelfimov
Copy link
Member

@Nelfimov
Copy link
Member

проверь последний ли "старый" у тебя бандл - ошибка в билде есть.

@Nelfimov версия бандла: 0.0.1-git.20240508.hash-0eb6cc8e, везде её использую

При билде, например @atls-ui-parts/layout, такая ошибка падает:

➤ YN0000: │   Error: The project root is ambiguous, but is required to resolve export map entry '.' in file 
➤ YN0000: │        '/home/amiditin/React/hyperion/.yarn/__virtual__/@atls-ui-parts-theme-virtual-642118c83a/1/ui-parts/theme/package.json'. Supply the `rootDir` compiler option to disambiguate.

Попробовал по разному прописать rootDir в tsconfig, не помогает

Попробуй играться с exports и main в package.json

@Amiditin Amiditin requested a review from Nelfimov August 23, 2024 13:16
@Nelfimov
Copy link
Member

@Amiditin релиз проверял локально?

@Amiditin
Copy link
Member Author

@Amiditin релиз проверял локально?

@Nelfimov вот это?

$ yarn workspaces foreach -A image pack --publish --tag-policy hash-timestamp --registry some

[@atls-ui-generators/button]: Process started
[@atls-ui-generators/button]: ➤ YN0000: Workspace @atls-ui-generators/button not allowed for package.
[@atls-ui-generators/button]: ➤ YN0000: Done in 0s 1ms
[@atls-ui-generators/button]: Process exited (exit code 0), completed in 0s 105ms
...

@Nelfimov
Copy link
Member

@Amiditin да, именно для сторибуков

@Amiditin
Copy link
Member Author

@Amiditin да, именно для сторибуков

@Nelfimov для каждого пакета пишет Workspace @atls-ui-admin/design not allowed for package

@Nelfimov
Copy link
Member

@Amiditin вот эта функция определяет нужно ли паковать воркспейс: https://github.com/atls/raijin/blob/392aad8543f181c41eb6519d5e326fa6a72a812a/yarn/plugin-image/sources/image-pack.command.ts#L133

Думаю поймешь на что она смотрит. Как выход можешь добавить один из "разрешенных", а за ним - тот что действительно нужен

@Amiditin
Copy link
Member Author

Думаю поймешь на что она смотрит. Как выход можешь добавить один из "разрешенных", а за ним - тот что действительно нужен

Добавил storybook build в массив разрешенных скриптов внутрь бандла, дальше image pack работает, но какая-то локальная ошибка появляется

~/React/hyperion$ yarn workspace @atls-ui-admin/design image pack --publish --tag-policy hash-timestamp --registry some
➤ YN0000: Package workspace @atls-ui-admin/design to /tmp/c88c65ddcb3fa1723c4ad7c0e9ad8304
➤ YN0036: Calling the "prepack" lifecycle script
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @vanilla-extract/css@npm:1.15.3, @vanilla-extract/dynamic@npm:2.1.1, cors@npm:2.8.5, express@npm:4.19.2, and 83 more.
➤ YN0000: └ Completed in 0s 841ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0068: │ @types/react ➤ dependencies ➤ scheduler: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ @emotion/utils ➤ dependencies ➤ @emotion/sheet: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ @storybook/node-logger ➤ dependencies ➤ storybook: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ @storybook/types ➤ dependencies ➤ @types/react: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ @storybook/builder-webpack5 ➤ dependencies ➤ file-system-cache: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ @storybook/preset-react-webpack ➤ dependencies ➤ file-system-cache: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ @testing-library/react ➤ dependencies ➤ pretty-format: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ @testing-library/react ➤ dependencies ➤ react-dom: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ swiper ➤ dependencies ➤ @types/react: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ graphql-request ➤ dependencies ➤ type-fest: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0068: │ framer-motion ➤ dependencies ➤ @emotion/is-prop-valid: No matching package in the dependency tree; you may not need this rule anymore.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 265ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: ┌ Copy RC files
➤ YN0000: │ .yarnrc.yml
➤ YN0000: └ Completed
➤ YN0000: ┌ Copy plugins
➤ YN0000: │ .yarn/plugins
➤ YN0000: └ Completed
➤ YN0000: ┌ Copy Yarn releases
➤ YN0000: │ .yarn/releases/yarn-remote.cjs
➤ YN0000: └ Completed
➤ YN0000: yarn.lock
➤ YN0001: Error: spawn pack ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0000: Failed with errors in 24s 598ms

@Nelfimov
Copy link
Member

Что выдает storybook build? Должен быть как минимум index.js который можно запустить

@Amiditin
Copy link
Member Author

Что выдает storybook build? Должен быть как минимум index.js который можно запустить

только index.html, который запускается через express

dist/sb-addons 
dist/sb-common-assets 
dist/sb-manager 
dist/sb-preview 
dist/407.css 
dist/735.css 
dist/button-src-button-stories.css 
dist/upload-src-upload-stories.css 
dist/iframe.html 
dist/index.html 
dist/227.ce5ea513.iframe.bundle.js 
dist/239.422fabd0.iframe.bundle.js 
dist/329.87695999.iframe.bundle.js 
dist/358.10567090.iframe.bundle.js 
dist/407.89218423.iframe.bundle.js 
dist/413.d484d0d0.iframe.bundle.js 
dist/487.a6757588.iframe.bundle.js 
dist/556.ee7b07d1.iframe.bundle.js 
dist/559.b6608d3e.iframe.bundle.js 
dist/647.2c86bf46.iframe.bundle.js 
dist/724.475126f6.iframe.bundle.js 
dist/735.46894bbe.iframe.bundle.js 
dist/990.c49405ad.iframe.bundle.js 
dist/button-src-button-stories.32405d74.iframe.bundle.js 
dist/main.8b6be4ef.iframe.bundle.js 
dist/runtime~main.e1ef6fb5.iframe.bundle.js 
dist/text-src-text-stories.3b0bd279.iframe.bundle.js 
dist/upload-src-upload-stories.ae41bb1f.iframe.bundle.js 
dist/index.json 
dist/project.json 
dist/239.422fabd0.iframe.bundle.js.map 
dist/407.css.map 
dist/556.ee7b07d1.iframe.bundle.js.map 
dist/735.css.map 
dist/button-src-button-stories.css.map 
dist/upload-src-upload-stories.css.map 
dist/favicon.svg 
dist/239.422fabd0.iframe.bundle.js.LICENSE.txt 
dist/407.89218423.iframe.bundle.js.LICENSE.txt 
dist/556.ee7b07d1.iframe.bundle.js.LICENSE.txt

@Nelfimov
Copy link
Member

@Amiditin попробуй его насильно переименовать в index.js

@Amiditin
Copy link
Member Author

@Amiditin попробуй его насильно переименовать в index.js

зачем .html файл переименовывать в .js ошибки же будут? попробовал добавить после билда touch ./dist/index.js не помогло

@Nelfimov
Copy link
Member

@Amiditin Я про server.js

Если не прокатит - запусти массовый препак по всей репе. Если без ошибок - сторибуком отдельно займёмся

@Amiditin
Copy link
Member Author

Если не прокатит - запусти массовый препак по всей репе. Если без ошибок - сторибуком отдельно займёмся

Конкретизировал пути до .strories.ts файлов, чтобы не было ошибок с дупликатами из билдов пакетов.

Запустил yarn workspaces foreach -A run prepack, сработало без ошибок

Copy link
Member

@Nelfimov Nelfimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сторибук добьем отдельно

@TorinAsakura TorinAsakura merged commit 3816b96 into master Aug 23, 2024
5 checks passed
@TorinAsakura TorinAsakura deleted the feat/vanilla-extract-migration branch August 23, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vanilla/extract: изучить возможность использования у нас
3 participants