fix(theme): resolve global css ESM import#719
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Таска
Как проверять
До фикса
Контекст: опубликованные npm tarball-ы
@atls-ui-parts/theme@1.1.0и@atls-ui-admin/theme@1.0.9.Действие: открыть
package/dist/theme.css.jsи проверить относительный import глобальных стилей.Ожидаемый результат: файл импортирует
./global.css, при этомpackage/dist/global.cssв tarball отсутствует.Контекст: Raijin/PnP-потребитель, который тянет визуальный стек через
@atls-ui-parts/button.Действие: пройти до ESM-resolution published package.
Ожидаемый результат: PnP падает на отсутствующем
@atls-ui-parts/theme/dist/global.cssдо Astro/Vite.После фикса
Контекст: пакетный артефакт
@atls-ui-parts/theme.Действие: выполнить
yarn workspace @atls-ui-parts/theme pack --out /tmp/atls-ui-parts-theme.tgzи проверитьpackage/dist/theme.css.js.Ожидаемый результат: tarball содержит
dist/global.css.js, аdist/theme.css.jsимпортирует./global.css.js.Контекст: пакетный артефакт
@atls-ui-admin/theme.Действие: выполнить
yarn workspace @atls-ui-admin/theme pack --out /tmp/atls-ui-admin-theme.tgzи проверитьpackage/dist/theme.css.js.Ожидаемый результат: tarball содержит
dist/global.css.js, аdist/theme.css.jsимпортирует./global.css.js.Контекст: regression guard в theme-пакетах.
Действие: выполнить
yarn test unit theme-css-import.test.ts.Ожидаемый результат: тесты падают при возврате bare
./global.cssи проходят при./global.css.js.Контекст: весь опубликованный Hyperion-контур.
Действие: просканировать npm tarball-ы локальных
@atls-ui*и@atls-utils*пакетов на относительные ESM-ссылки, которые указывают на отсутствующие файлы.Ожидаемый результат: тот же класс дефекта подтверждается только в
@atls-ui-parts/themeи@atls-ui-admin/theme; срабатывания по template literal генераторов не считаются исполняемыми imports.Пруфы
yarn test unit theme-css-import.test.ts— pass, 4 pass / 0 failyarn workspace @atls-ui-parts/theme build— passyarn workspace @atls-ui-admin/theme build— passyarn workspace @atls-ui-parts/theme lint— passyarn workspace @atls-ui-admin/theme lint— passyarn workspace @atls-ui-parts/theme pack --out /tmp/atls-ui-parts-theme.tgz— pass,dist/theme.css.jsimports./global.css.jsyarn workspace @atls-ui-admin/theme pack --out /tmp/atls-ui-admin-theme.tgz— pass,dist/theme.css.jsimports./global.css.js./*.cssimports are absent after this change@atls-ui-parts/theme@1.1.0and@atls-ui-admin/theme@1.0.9;@atls-ui-generators/icons@1.2.2is a template literal false positivegit diff --check— pass