Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 0 additions & 23 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/publish-workflow-1-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'
cache: 'yarn'
always-auth: true
registry-url: 'https://registry.npmjs.org'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ jobs:
- name: Run lint:ci command
run: yarn run lint:ci

- name: Upload lint scripts artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: lint-scripts-output
path: lint-results.json

test:
runs-on: ubuntu-latest
name: Run unit tests
Expand All @@ -46,30 +39,3 @@ jobs:
- name: Run tests for the specified workspace
run: yarn run test:ci

- name: Upload test artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: test-output
path: test-results.json

report_ci:
if: ${{ always() }}
needs:
- linters
- test
runs-on: ubuntu-latest
name: Report CI results
steps:
- name: Download lint scripts artifact
uses: actions/download-artifact@v4
with:
name: lint-scripts-output

- name: Download test artifact
uses: actions/download-artifact@v4
with:
name: test-output

- name: Push reports
uses: VKCOM/gh-actions/VKUI/reporter@main
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ yarn-error.log
# Coverage directories used by tools like istanbul
coverage
.nyc_output

artifact.tgz
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v25.9.0
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

Binary file removed artifact.tgz
Binary file not shown.
50 changes: 50 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": { "ignoreUnknown": false },
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 100,
"attributePosition": "auto",
"bracketSameLine": false,
"bracketSpacing": true,
"expand": "auto",
"useEditorconfig": true,
"includes": ["**", "!**/node_modules/**/*", "!**/dist/**/*", "!**/package.json"]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "off"
},
"complexity": {
"noBannedTypes": "off"
}
},
"includes": ["**", "!**/node_modules/**/*", "!**/dist/**/*"]
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "preserve",
"trailingCommas": "all",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSpacing": true
}
},
"assist": {
"enabled": true,
"actions": { "source": { "organizeImports": "off" } },
"includes": ["**", "!**/node_modules/**/*", "!**/dist/**/*"]
}
}
12 changes: 0 additions & 12 deletions jest.config.js

This file was deleted.

58 changes: 12 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,36 @@
{
"private": true,
"name": "@vk-bridge/monorepo",
"type": "module",
"version": "0.0.0",
"scripts": {
"build": "yarn workspaces foreach -t run build",
"build:clean": "rimraf packages/**/dist packages/**/node_modules/.cache",
"test": "yarn build && jest",
"test:ci": "jest --ci --silent --outputFile ./test-results.json --json",
"lint": "yarn build && concurrently 'yarn:lint:es' 'yarn:lint:types' 'yarn:lint:prettier'",
"lint:ci": "concurrently 'yarn:lint:es:ci' 'yarn:lint:types' 'yarn:lint:prettier'",
"lint:es": "eslint . --ignore-path .gitignore --ext .mjs,.js,.ts --cache --cache-location .cache/.eslintcache",
"lint:es:ci": "yarn run lint:es -o lint-results.json -f json",
"lint:es:fix": "yarn run lint:es --fix",
"lint:prettier": "prettier --check --ignore-unknown .",
"lint:prettier:fix": "prettier --check --ignore-unknown . --write",
"lint:types": "./node_modules/typescript/bin/tsc --incremental --declaration --noEmit --tsBuildInfoFile .cache/.tsbuildinfo",
"test": "yarn workspaces foreach -t run test",
"test:ci": "yarn workspaces foreach -t run test",
"lint": "yarn build && concurrently 'yarn:lint:types' 'yarn:lint:biome'",
"lint:ci": "concurrently 'yarn:lint:types' 'yarn:lint:biome'",
"lint:biome": "biome check",
"lint:biome:fix": "biome check --write",
"lint:types": "yarn workspaces foreach -t run lint:types",
"g:npm:version": "cd $INIT_CWD && npm version --no-workspaces-update --no-commit-hooks --no-git-tag-version",
"prepare": "husky install",
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{mjs,js,ts}": [
"prettier --check",
"eslint"
],
"*.{json,md}": [
"prettier --check"
"*.{mjs,js,ts,json,md}": [
"biome check"
]
},
"devDependencies": {
"@babel/core": "^7.22.5",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^25.0.2",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-terser": "^0.4.3",
"@types/jest": "^29.5.1",
"@types/node": "^20.6.5",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"@vkontakte/eslint-plugin": "^1.1.1",
"@vkontakte/prettier-config": "^0.1.0",
"@biomejs/biome": "^2.4.12",
"concurrently": "^8.2.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unicorn": "^47.0.0",
"husky": "^8.0.3",
"jest": "^29.5.0",
"lint-staged": "^13.2.2",
"prettier": "^2.8.8",
"rimraf": "^5.0.1",
"rollup": "^3.29.3",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-typescript2": "^0.35.0",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"typescript-3.8.3": "npm:typescript@3.8.3"
"rimraf": "^5.0.1"
},
"workspaces": [
"packages/*"
],
"engines": {
Comment thread
pasha-nikitin-2003 marked this conversation as resolved.
"node": ">=14.18.0"
},
"packageManager": "yarn@3.6.0"
}
5 changes: 5 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v3.0.0

- Сборка `esm`-only
- Сборка `es2020`

## v2.15.11

- Добавлены post-install скрипты-предупреждения о скором релизе мажорной версии
Expand Down
11 changes: 0 additions & 11 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ bridge.send('VKWebAppInit');
bridge.subscribe((e) => console.log(e));
```

For use in a browser, include the file [`dist/browser.min.js`](https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js) and use as follows

```html
<script src="https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js"></script>

<script>
// Sends event to client
vkBridge.send('VKWebAppInit');
</script>
```

## API Reference

### `bridge.send(method[, params])`
Expand Down
43 changes: 26 additions & 17 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
{
"name": "@vkontakte/vk-bridge",
"version": "2.15.12",
"version": "3.0.0",
"description": "Connects a Mini App with VK client",
"license": "MIT",
"main": "dist/index.js",
"browser": "dist/index.umd.js",
"module": "dist/index.es.js",
"umdName": "vkBridge",
"types": "dist/types/src/index.d.ts",
"typesVersions": {
"<4.0": {
"*": [
"dist/types3.8.3/src/index.d.ts"
]
}
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"./dist/browser.min.js": "./dist/browser.min.js"
},
"main": "dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist",
"scripts"
"scripts",
"src"
],
"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",
"watch": "rslib --watch",
"build": "rslib",
"prepack": "yarn run build",
"test": "yarn run --top-level jest --config ../../jest.config.js",
"test": "node --test 'src/*.test.*'",
"lint:types": "tsc -b",
"postinstall": "node scripts/postinstall.js"
},
"author": {
Expand All @@ -35,5 +36,13 @@
"type": "git",
"url": "https://github.com/VKCOM/vk-bridge",
"directory": "packages/core"
},
"devDependencies": {
"@rslib/core": "^0.21.2",
"@types/node": "^25.6.0",
"typescript": "^6.0.3"
},
"dependencies": {
"@swc/helpers": "^0.5.21"
Comment thread
pasha-nikitin-2003 marked this conversation as resolved.
}
}
40 changes: 0 additions & 40 deletions packages/core/rollup.config-legacy-types.mjs

This file was deleted.

Loading
Loading