Merged
Conversation
- closed #7206
Contributor
size-limit report 📦
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Contributor
e2e tests |
Contributor
👀 Docs deployed
Commit 6896170 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7611 +/- ##
=======================================
Coverage 95.21% 95.21%
=======================================
Files 384 384
Lines 11345 11345
Branches 3720 3720
=======================================
Hits 10802 10802
Misses 543 543
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
SevereCloud
added a commit
that referenced
this pull request
Sep 19, 2024
Возвращаем поле module для поддержки webpack v4 - cause #7611
SevereCloud
added a commit
that referenced
this pull request
Sep 19, 2024
Возвращаем поле module для поддержки webpack v4 - cause #7611
inomdzhon
added a commit
that referenced
this pull request
Oct 14, 2024
h2. Описание В #7611 забыли про `package.json`, который можно импортировать. h2. Release notes h2. Исправления - в поле `"exports"` добавлен `package.json`
This was referenced Oct 22, 2024
inomdzhon
added a commit
that referenced
this pull request
Nov 18, 2024
## Описание В #7611 у пакета `packages/vkui` мы удалили поле `"main"`, но при этом `"type"` остался как `commonjs`. Обнаружил это при тестировании `v7.0.0-beta.1` в стороннем репозитории при запуске **Jest**. Из-за `"type": "commonjs"`, он пытается обратиться к полю `"main"`, но так как его нет, тест падает с ошибкой `Cannot find module`. С `"type": "module"` такой проблемы не будет, т.к. уже будет обращаться к полю `"module"`. ## Изменения Это повлекло за собой следующие изменения: - ~`packages/vkui/shared.config.js`~ – переименование в `.mjs` не удалось из-за **react-styleguidist**, который не умеет в **ESM**, поэтому перенёс содержимое в корневой `shared.js`, который используется только в папке `/styleguide` - `stylelint.config.mjs` – заменил импорты из `shared.config.js` на объявление путей прямо в файле - `packages/vkui/cssm/postcss.config.js` → `packages/vkui/cssm/postcss.config.cjs` – заменил импорты из `shared.config.js` на объявление путей прямо в файле - `packages/vkui/scripts/postcss.js` → `packages/vkui/scripts/postcss.cjs` – заменил импорты из `shared.config.js` на объявление путей прямо в файле, а также перенёс объявления `VKUI_TOKENS_CSS` и `generateScopedName` - `packages/vkui/tsconfig.json` – упростил `include`, а то было точечное определение файлов - `packages/vkui/.eslintrc.js` → `packages/vkui/.eslintrc.cjs`, иначе падает с ошибкой **ERR_REQUIRE_ESM**. Также обнаружилось, что в `@vkontakte/vkjs` не хватает поля `"exports"` (см. VKCOM/vkjs#552) - `packages/vkui/rspack.styles.config.ts` → `packages/vkui/rspack.styles.config.mjs`, т.к. начал падать с ошибкой `ERR_UNKNOWN_FILE_EXTENSION` - `packages/vkui/playwright-ct.config.ts` → `packages/vkui/playwright-ct.config.mjs`, т.к. **Playwright** хочет **ESM** синтаксис для `__dirname` и импортов **JSON**, что не соответствует нашему `tsconfig.json`, а отдельный `tsconfig.e2e.json` не завёлся. Также перенёс плагины из `scripts/postcss.cjs` прямо в конфиг, т.к. импорт `scripts/postcss.cjs` фризит запуск **Playwright** - `packages/vkui/jest.config.ts` – добавляем `@vkontakte/vkjs` в `transformIgnorePatterns`, т.к. библиотека теперь полностью поставляется как ESM (VKCOM/vkjs#552).
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.
Описание
CJS устарел
Изменения
Release notes
BREAKING CHANGE
@vkontakte/vkui/dist/cjs/index.jsexportsвpackage.json