Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v2.15.11

- Добавлены post-install скрипты-предупреждения о скором релизе мажорной версии
- Добавлено предупреждение в README

## v2.15.10

- Технический релиз
Expand Down
7 changes: 7 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# VK Bridge Core

> [!WARNING] > **You are using version 2.x.x**
> The upcoming major release **3.0.0** will introduce **breaking changes**:
>
> - **ESM-only** — the package will be published as ES modules only. CommonJS is not officially supported
> - **TypeScript 4.0+** — support for TS 3.x is being dropped
> - **Enum removal** — use string values instead

## Usage

```js
Expand Down
6 changes: 4 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
}
},
"files": [
"dist"
"dist",
"scripts"
],
"scripts": {
"watch": "yarn run --top-level rollup -c -w",
"build": "NODE_ENV=production yarn run --top-level rollup -c && yarn run build:legacy-types",
"build:legacy-types": "yarn run --top-level rollup -c rollup.config-legacy-types.mjs >/dev/null",
"prepack": "yarn run build",
"test": "yarn run --top-level jest --config ../../jest.config.js"
"test": "yarn run --top-level jest --config ../../jest.config.js",
"postinstall": "node scripts/postinstall.js"
},
"author": {
"name": "VK",
Expand Down
24 changes: 24 additions & 0 deletions packages/core/scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env node

const currentVersion = require('../package.json').version;

// Показываем только для v2.x.x
if (!currentVersion.startsWith('2.')) {
process.exit(0);
}

console.warn(`
⚠️ IMPORTANT NOTICE!

You are using @vkontakte/vk-bridge@${currentVersion}

The upcoming major release 3.0.0 will introduce BREAKING CHANGES:
• ESM-only — the package will be published as ES modules only (CommonJS/require is not officially supported)
• TypeScript 4.0+ — support for TS 3.x will be dropped
• Enum removal — use string values instead of EAdsFormats.REWARD

We recommend preparing in advance:
• Upgrade TypeScript to version 4.0 or higher
• Replace require() with import in your codebase
• Check your code for enum usage
`);
5 changes: 5 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v1.1.3

- Добавлены post-install скрипты-предупреждения о скором релизе мажорной версии
- Добавлено предупреждение в README

## v1.1.2

- Исправлена проблема установки: версия 1.1.1 могла не устанавливаться через npm.
Expand Down
8 changes: 8 additions & 0 deletions packages/react/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# VK Bridge React

> ### ⚠️ Warning: You are using version 1.x.x
>
> The upcoming major release **2.0.0** will introduce **breaking changes**:
>
> - **Requires `@vkontakte/vk-bridge@^3.0.0`**
> - **ESM-only** — aligns with the core package
> - **TypeScript 4.0+** — minimum version bumped

React hooks for VK Bridge.

In addition, the library provides other helper functions.
Expand Down
6 changes: 4 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
"module": "dist/index.es.js",
"types": "dist/types/index.d.ts",
"files": [
"dist"
"dist",
"scripts"
],
"scripts": {
"watch": "yarn run --top-level rollup -c -w",
"build": "NODE_ENV=production yarn run --top-level rollup -c",
"prepack": "yarn run build"
"prepack": "yarn run build",
"postinstall": "node scripts/postinstall.js"
},
"author": {
"name": "VK",
Expand Down
23 changes: 23 additions & 0 deletions packages/react/scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env node

const currentVersion = require('../package.json').version;

if (!currentVersion.startsWith('1.')) {
process.exit(0);
}

console.warn(`
⚠️ IMPORTANT NOTICE!

You are using @vkontakte/vk-bridge-react@${currentVersion}

The upcoming major release 2.0.0 will introduce BREAKING CHANGES:
• Requires @vkontakte/vk-bridge@^3.0.0
• ESM-only — follows the core package (CommonJS/require is not officially supported)
• TypeScript 4.0+ — minimum supported version is increased

We recommend preparing in advance:
• Upgrade @vkontakte/vk-bridge to version 3.0.0
• Upgrade TypeScript to version 4.0 or higher
• Update both packages together
`);
Loading