Skip to content

Commit

Permalink
feat: add side-effects;
Browse files Browse the repository at this point in the history
  • Loading branch information
denisx committed Dec 19, 2024
1 parent 960951e commit d674052
Show file tree
Hide file tree
Showing 31 changed files with 65 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .changeset/nervous-ants-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
'@alfalab/core-components-drawer': patch
'@alfalab/core-components-form-control': patch
'@alfalab/core-components-notification': patch
'@alfalab/core-components-notification-manager': patch
'@alfalab/core-components-number-input': patch
'@alfalab/core-components-pagination': patch
'@alfalab/core-components-pass-code': patch
'@alfalab/core-components-pass-code-v1': patch
'@alfalab/core-components-password-input': patch
'@alfalab/core-components-pattern-lock': patch
'@alfalab/core-components-pattern-lock-v1': patch
'@alfalab/core-components-popover': patch
'@alfalab/core-components-popup-sheet': patch
'@alfalab/core-components-portal': patch
'@alfalab/core-components-product-cover': patch
'@alfalab/core-components-pure-cell': patch
'@alfalab/core-components-radio': patch
'@alfalab/core-components-radio-group': patch
'@alfalab/core-components-segmented-control': patch
'@alfalab/core-components-shared': patch
'@alfalab/core-components-skeleton': patch
'@alfalab/core-components-slider-input': patch
'@alfalab/core-components-status-badge': patch
'@alfalab/core-components-stepped-progress-bar': patch
'@alfalab/core-components-switch': patch
'@alfalab/core-components-system-message': patch
'@alfalab/core-components-time-input': patch
'@alfalab/core-components-with-suffix': patch
---

- Добавлено "sideEffects": false, чтобы бандлер лучше делал тришейк.
- В SideEffect пакета base-modal добавлена зависимость от полифила.
2 changes: 1 addition & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lerna exec --scope @alfalab/core-components-themes -- node $(pwd)/bin/build-them
lerna exec --scope @alfalab/core-components-vars -- node $(pwd)/bin/export-css-custom-properties-as-js-vars.js

# собираю все подпакеты с компонентами
lerna exec --concurrency $CONCURRENCY \
lerna exec --scope @alfalab/core-components-base-modal \
--ignore @alfalab/core-components-codemod \
-- $(pwd)/bin/rollup.sh

Expand Down
4 changes: 3 additions & 1 deletion packages/base-modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"sideEffects": [
"matches-polyfill.*"
],
"dependencies": {
"@alfalab/core-components-backdrop": "^3.4.3",
"@alfalab/core-components-global-store": "^2.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/form-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/notification-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/notification/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/number-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/pagination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/pass-code-v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/pass-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/password-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/pattern-lock-v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/pattern-lock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/popover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/popup-sheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/product-cover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/pure-cell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/radio-group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/segmented-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": ">=16.8.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/skeleton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/slider-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/status-badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": ">=16.8.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/stepped-progress-bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/switch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/system-message/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": ">=16.8.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/time-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/with-suffix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"access": "public",
"directory": "dist"
},
"sideEffects": false,
"peerDependencies": {
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
},
Expand Down

0 comments on commit d674052

Please sign in to comment.