mirror of
https://github.com/tenrok/BBob.git
synced 2026-05-15 11:59:37 +03:00
chore: update build system and dependencies (#155)
* chore: fix swc + rollup transform * chore: fix pkg-task args parsing * chore: update lerna, rollup and swc to build proper es6 files * chore: fix swc build for es targets * ci: nodes matrix to newest versions * ci: rollup to mjs, swc to json * ci: add canary publish * ci: no git tag for canary * ci: no private publish for canary * ci: remove --canary from publish-canary * fix: remove gitHead from package.json * fix: tests setup * fix: bbob plugin helper imports * fix: plugin helper build priority and circular deps * fix: add nx for parallel build * fix: npm ci * fix: code ql * fix: remove exports directive * fix: rollup build * fix: vue2 test and minify * fix: bundle size limits * feat: bundlephobia pr review * feat: bundlephobia more popular action * feat: publish branch to npm * fix: secret NPM token * fix: bundlephobia version * fix: remove bundlephobia checker * fix: npm publish in PR * chore: release 2.8.3 * chore: fix test runs on CI, removed 14.x version * fix: sync package-lock * fix: remove lock files in sub packages * fix: bundlesize > bundlesize2 * fix: update lock files * fix: lock file in vue2-example
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/examples"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
allow:
|
||||
- dependency-type: "production"
|
||||
@@ -1,7 +1,9 @@
|
||||
name: Benchmark
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
benchmark:
|
||||
name: Benchmark
|
||||
|
||||
@@ -28,6 +28,7 @@ jobs:
|
||||
with:
|
||||
node-version: '16.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
|
||||
- run: npm ci
|
||||
- run: npm run bootstrap
|
||||
- run: npm run publish-ci
|
||||
@@ -46,6 +47,7 @@ jobs:
|
||||
with:
|
||||
node-version: '16.x'
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
|
||||
- run: npm ci
|
||||
- run: npm run bootstrap
|
||||
- run: npm run publish-ci
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x, 16.x]
|
||||
node-version: [16.x, 18.x, 19.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"module": {
|
||||
"type": "es6"
|
||||
},
|
||||
"env": {
|
||||
"loose": true,
|
||||
"targets": "> 0.25%, not dead"
|
||||
},
|
||||
"jsc": {
|
||||
"loose": true,
|
||||
"parser": {
|
||||
"syntax": "ecmascript",
|
||||
"jsx": true,
|
||||
"numericSeparator": false,
|
||||
"classPrivateProperty": false,
|
||||
"privateMethod": false,
|
||||
"classProperty": false,
|
||||
"functionBind": false,
|
||||
"decorators": false,
|
||||
"decoratorsBeforeExport": false
|
||||
},
|
||||
"transform": {
|
||||
"react": {
|
||||
"pragma": "React.createElement",
|
||||
"pragmaFrag": "React.Fragment",
|
||||
"throwIfNamespace": true,
|
||||
"development": false,
|
||||
"useBuiltins": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"module": {
|
||||
"type": "commonjs",
|
||||
"strict": false,
|
||||
"strictMode": true,
|
||||
"lazy": false,
|
||||
"noInterop": false,
|
||||
"ignoreDynamic": false
|
||||
},
|
||||
"jsc": {
|
||||
"loose": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"module": {
|
||||
"type": "commonjs",
|
||||
|
||||
"strict": false,
|
||||
"strictMode": true,
|
||||
"lazy": false,
|
||||
"noInterop": false
|
||||
},
|
||||
"jsc": {
|
||||
"transform": {
|
||||
"optimizer": {
|
||||
"simplify": false
|
||||
}
|
||||
},
|
||||
"loose": true,
|
||||
"parser": {
|
||||
"syntax": "ecmascript",
|
||||
"jsx": true
|
||||
}
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"module": {
|
||||
"type": "es6",
|
||||
"strict": false,
|
||||
"strictMode": false,
|
||||
"lazy": false,
|
||||
"noInterop": false
|
||||
},
|
||||
"minify": false,
|
||||
"jsc": {
|
||||
"transform": {
|
||||
"optimizer": {
|
||||
"simplify": false
|
||||
}
|
||||
},
|
||||
"target": "es2018",
|
||||
"loose": true,
|
||||
"parser": {
|
||||
"syntax": "ecmascript",
|
||||
"jsx": true
|
||||
},
|
||||
"externalHelpers": false
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/BBob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add nx for parallel build ([683062d](https://github.com/JiLiZART/BBob/commit/683062dec98abee148d022db7c1a339e7b7750b2))
|
||||
* bbob plugin helper imports ([5f76548](https://github.com/JiLiZART/BBob/commit/5f76548b78b29f0905f74804e4a1d0634f085c1b))
|
||||
* bundle size limits ([edfdfed](https://github.com/JiLiZART/BBob/commit/edfdfedd06214ec9769f892407153d5b023e35aa))
|
||||
* bundlephobia version ([8be7dbc](https://github.com/JiLiZART/BBob/commit/8be7dbc30616ec95802ff2c4380cc4843ef4569b))
|
||||
* code ql ([d6cbafe](https://github.com/JiLiZART/BBob/commit/d6cbafe8ba24e1e837333e644073a0e76c3eed07))
|
||||
* npm ci ([7093e12](https://github.com/JiLiZART/BBob/commit/7093e12afee8dfabebd82e50a229d7b6402cf774))
|
||||
* npm publish in PR ([6145965](https://github.com/JiLiZART/BBob/commit/61459659895eecb4364c4f74c34dc0660fef3c1b))
|
||||
* plugin helper build priority and circular deps ([cac47c6](https://github.com/JiLiZART/BBob/commit/cac47c6fc7e30c419691f7e8bc33f118211fc044))
|
||||
* remove bundlephobia checker ([e912463](https://github.com/JiLiZART/BBob/commit/e9124638d5b628a9e2152414864ba5c4b47498ad))
|
||||
* remove exports directive ([a6efc40](https://github.com/JiLiZART/BBob/commit/a6efc4023b5cb09b56436a0dbe698423b2feecf1))
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/BBob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
* rollup build ([a31c97e](https://github.com/JiLiZART/BBob/commit/a31c97e6cb7b1b2790a96940c2aff137ef2e4f57))
|
||||
* secret NPM token ([abccc78](https://github.com/JiLiZART/BBob/commit/abccc78c7f51f3e7fe75c700d4448fe770af2bb5))
|
||||
* tests setup ([4c1e066](https://github.com/JiLiZART/BBob/commit/4c1e06683e7164d44ad82541f63ca01918e5f99a))
|
||||
* vue2 test and minify ([af3ba58](https://github.com/JiLiZART/BBob/commit/af3ba58c40717f07ce5be4a6df0aaa6f791e81f0))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* bundlephobia more popular action ([8725f04](https://github.com/JiLiZART/BBob/commit/8725f04afff8a089d26f5552ca880e9ec68c1c8b))
|
||||
* bundlephobia pr review ([a459045](https://github.com/JiLiZART/BBob/commit/a459045835d0adecdb45c94c4b63f2e2b7920b4e))
|
||||
* publish branch to npm ([2200e0a](https://github.com/JiLiZART/BBob/commit/2200e0a6e227d004477c74e63cb73bf5510f9305))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/BBob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
|
||||
|
||||
+64
-1
@@ -1,6 +1,69 @@
|
||||
{
|
||||
"name": "benchmark",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "benchmark",
|
||||
"dependencies": {
|
||||
"@bbob/parser": "^2.7.1",
|
||||
"benchmark": "2.1.4",
|
||||
"picocolors": "1.0.0",
|
||||
"xbbcode-parser": "0.1.2",
|
||||
"ya-bbcode": "1.0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/@bbob/parser": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@bbob/parser/-/parser-2.7.1.tgz",
|
||||
"integrity": "sha512-tpfkbxXU4klszMjXGWrq9N8v2FdsakPMjj9nPEDVg15j0GRnhRSkWetwFSa31t6uXQ7cSTA6N/IdgMN9EDB5tw==",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.7.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@bbob/plugin-helper": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@bbob/plugin-helper/-/plugin-helper-2.7.1.tgz",
|
||||
"integrity": "sha512-84DfXx7yQ0OJZN6bf/54q6RPhLFImLnMtCpCAlJO8ExNpWQuOJv0aTJJ4vRRRiyuPJ2uCECSalgOZv2t8j/M0g=="
|
||||
},
|
||||
"node_modules/benchmark": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz",
|
||||
"integrity": "sha1-CfPeMckWQl1JjMLuVloOvzwqVik=",
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.4",
|
||||
"platform": "^1.3.3"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
|
||||
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
|
||||
},
|
||||
"node_modules/platform": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
|
||||
"integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg=="
|
||||
},
|
||||
"node_modules/xbbcode-parser": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/xbbcode-parser/-/xbbcode-parser-0.1.2.tgz",
|
||||
"integrity": "sha1-Bs5gpA9WagZz6rIR024jgpJgdGc="
|
||||
},
|
||||
"node_modules/ya-bbcode": {
|
||||
"version": "1.0.12",
|
||||
"resolved": "https://registry.npmjs.org/ya-bbcode/-/ya-bbcode-1.0.12.tgz",
|
||||
"integrity": "sha512-CI/2AmfmRDv/qxIpaTFymrzpnEn4VUa8Jsnoad6eidkhjQ8UTyim+XwPhDu/r9IZh9uzJugXZV0iyJQgX1FSCA==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/parser": {
|
||||
"version": "2.7.1",
|
||||
|
||||
Generated
+13442
-6776
File diff suppressed because it is too large
Load Diff
@@ -7,15 +7,15 @@
|
||||
"generate": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/preset-vue": "^2.8.0",
|
||||
"@bbob/vue2": "^2.8.0",
|
||||
"core-js": "^3.18.2",
|
||||
"vue": "^2.6.14"
|
||||
"@bbob/preset-vue": "*",
|
||||
"@bbob/vue2": "*",
|
||||
"core-js": "3.26.1",
|
||||
"vue": "2.7.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.13",
|
||||
"@vue/cli-service": "~4.5.13",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
"@vue/cli-plugin-babel": "5.0.8",
|
||||
"@vue/cli-service": "5.0.8",
|
||||
"vue-template-compiler": "2.7.14"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
const fs = require('fs');
|
||||
|
||||
const config = JSON.parse(fs.readFileSync(`${__dirname}/.swcrc`, 'utf-8'));
|
||||
const config = JSON.parse(fs.readFileSync(`${__dirname}/.swcrc-commonjs.json`, 'utf-8'));
|
||||
|
||||
module.exports = {
|
||||
verbose: true,
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"lerna": "2.11.0",
|
||||
"version": "2.8.2",
|
||||
"version": "2.8.3",
|
||||
"packages": [
|
||||
"benchmark",
|
||||
"scripts",
|
||||
@@ -25,5 +25,6 @@
|
||||
"version": {
|
||||
"message": "chore(release): publish %s"
|
||||
}
|
||||
}
|
||||
},
|
||||
"useNx": true
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"runner": "nx/tasks-runners/default",
|
||||
"options": {
|
||||
"cacheableOperations": ["build"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"targetDefaults": {},
|
||||
"defaultBase": "master"
|
||||
}
|
||||
Generated
+7970
-4627
File diff suppressed because it is too large
Load Diff
+24
-22
@@ -3,16 +3,17 @@
|
||||
"prepublishOnly": "npm run test",
|
||||
"bootstrap": "lerna bootstrap",
|
||||
"publish-ci": "npm run build && lerna publish from-package --yes --include-merged-tags --conventional-commits",
|
||||
"publish-canary": "npm run build && lerna publish --yes --include-merged-tags --conventional-commits --no-private --no-git-tag-version",
|
||||
"publish-from-packages": "npm run build && lerna publish from-package --yes --include-merged-tags --conventional-commits --create-release github",
|
||||
"publish-all": "npm run build && lerna publish --include-merged-tags --conventional-commits --create-release github --skip-npm",
|
||||
"publish-patch": "npm run build && lerna version patch --include-merged-tags --conventional-commits --no-git-tag-version --no-private",
|
||||
"publish-minor": "npm run build && lerna version minor --include-merged-tags --conventional-commits --no-git-tag-version --no-private",
|
||||
"size": "lerna run --parallel size",
|
||||
"bundlesize": "lerna run --parallel bundlesize",
|
||||
"test": "npm run build && lerna run --parallel link && lerna run --parallel test",
|
||||
"cover": "lerna run --parallel cover",
|
||||
"build": "lerna run --parallel build",
|
||||
"lint": "lerna run --parallel link && npm run build && lerna run --parallel lint"
|
||||
"size": "nx run-many --target=size",
|
||||
"bundlesize": "nx run-many --target=bundlesize",
|
||||
"test": "npm run build && nx run-many --target=link && nx run-many --target=test",
|
||||
"cover": "nx run-many --target=cover",
|
||||
"build": "nx run-many --target=build",
|
||||
"lint": "nx run-many --target=link && npm run build && nx run-many --target=lint"
|
||||
},
|
||||
"author": {
|
||||
"name": "Nikolay Kostyurin <jilizart@gmail.com>",
|
||||
@@ -22,14 +23,14 @@
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "13.2.1",
|
||||
"@commitlint/config-conventional": "13.2.0",
|
||||
"@rollup/plugin-commonjs": "21.0.0",
|
||||
"@rollup/plugin-node-resolve": "13.0.5",
|
||||
"@rollup/plugin-replace": "3.0.0",
|
||||
"@rollup/plugin-commonjs": "23.0.2",
|
||||
"@rollup/plugin-node-resolve": "15.0.1",
|
||||
"@rollup/plugin-replace": "5.0.1",
|
||||
"@size-limit/preset-small-lib": "6.0.1",
|
||||
"@swc/cli": "0.1.51",
|
||||
"@swc/core": "1.2.98",
|
||||
"@swc/jest": "0.2.4",
|
||||
"bundlesize": "0.18.1",
|
||||
"@swc/cli": "0.1.57",
|
||||
"@swc/core": "1.3.16",
|
||||
"@swc/jest": "0.2.23",
|
||||
"bundlesize2": "0.0.31",
|
||||
"cross-env": "7.0.3",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-airbnb": "18.2.1",
|
||||
@@ -37,17 +38,18 @@
|
||||
"eslint-plugin-jest": "25.0.1",
|
||||
"eslint-plugin-jsx-a11y": "6.4.1",
|
||||
"eslint-plugin-react": "7.26.1",
|
||||
"eslint-plugin-react-hooks": "4.6.0",
|
||||
"husky": "7.0.2",
|
||||
"jest": "27.2.5",
|
||||
"lerna": "4.0.0",
|
||||
"lerna": "6.0.3",
|
||||
"lint-staged": "11.2.3",
|
||||
"microtime": "3.0.0",
|
||||
"nx": "15.2.1",
|
||||
"posthtml-render": "^3.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "2.58.0",
|
||||
"rollup-plugin-gzip": "2.5.0",
|
||||
"rollup-plugin-swc": "0.2.0",
|
||||
"rollup-plugin-terser": "7.0.2",
|
||||
"rollup": "3.3.0",
|
||||
"rollup-plugin-gzip": "3.1.0",
|
||||
"rollup-plugin-swc3": "0.7.0",
|
||||
"size-limit": "6.0.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
@@ -60,12 +62,12 @@
|
||||
}
|
||||
},
|
||||
"pkgTasks": {
|
||||
"build-commonjs": "@/cross-env BABEL_ENV=commonjs NODE_ENV=production @/swc --config-file ../../.swcrc-commonjs --out-dir lib src",
|
||||
"build-es": "@/cross-env BABEL_ENV=es NODE_ENV=production @/swc --out-dir es src",
|
||||
"build-umd": "@/cross-env BABEL_ENV=rollup NODE_ENV=production @/rollup --config ../../rollup.config.js",
|
||||
"build-commonjs": "@/cross-env BABEL_ENV=commonjs NODE_ENV=production @/swc --config-file ../../.swcrc-commonjs.json --out-dir lib src",
|
||||
"build-es": "@/cross-env BABEL_ENV=es NODE_ENV=production @/swc --config-file ../../.swcrc.json --out-dir es src",
|
||||
"build-umd": "@/cross-env BABEL_ENV=rollup NODE_ENV=production @/rollup --config ../../rollup.config.mjs",
|
||||
"test": "@/jest",
|
||||
"cover": "@/jest --config ../../jest.config.js --coverage .",
|
||||
"lint": "@/eslint .",
|
||||
"bundlesize": "@/cross-env NODE_ENV=production @/bundlesize ."
|
||||
"bundlesize": "npm run build && @/cross-env NODE_ENV=production @/bundlesize ."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/cli
|
||||
|
||||
Generated
+138
-32
@@ -1,85 +1,191 @@
|
||||
{
|
||||
"name": "@bbob/cli",
|
||||
"version": "2.8.2",
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@bbob/cli",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/html": "^2.8.2",
|
||||
"@bbob/preset-html5": "^2.8.2",
|
||||
"commander": "^2.15.1"
|
||||
},
|
||||
"bin": {
|
||||
"bbob": "bin/bbob"
|
||||
}
|
||||
},
|
||||
"../bbob-core": {
|
||||
"name": "@bbob/core",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/parser": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-core/node_modules/@bbob/parser": {
|
||||
"resolved": "../bbob-parser",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-html": {
|
||||
"name": "@bbob/html",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-html/node_modules/@bbob/core": {
|
||||
"resolved": "../bbob-core",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-html/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-parser": {
|
||||
"name": "@bbob/parser",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-parser/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-plugin-helper": {
|
||||
"name": "@bbob/plugin-helper",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"../bbob-preset": {
|
||||
"name": "@bbob/preset",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"../bbob-preset-html5": {
|
||||
"name": "@bbob/preset-html5",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2",
|
||||
"@bbob/preset": "^2.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bbob/html": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-preset-html5/node_modules/@bbob/html": {
|
||||
"resolved": "../bbob-html",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-preset-html5/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-preset-html5/node_modules/@bbob/preset": {
|
||||
"resolved": "../bbob-preset",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bbob/html": {
|
||||
"resolved": "../bbob-html",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bbob/preset-html5": {
|
||||
"resolved": "../bbob-preset-html5",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "2.17.1",
|
||||
"license": "MIT"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/html": {
|
||||
"version": "2.5.6",
|
||||
"version": "file:../bbob-html",
|
||||
"requires": {
|
||||
"@bbob/core": "^2.5.6",
|
||||
"@bbob/plugin-helper": "^2.5.6"
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/core": {
|
||||
"version": "2.5.6",
|
||||
"version": "file:../bbob-core",
|
||||
"requires": {
|
||||
"@bbob/parser": "^2.5.6"
|
||||
"@bbob/parser": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/parser": {
|
||||
"version": "2.5.6",
|
||||
"version": "file:../bbob-parser",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.6"
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.6"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.6"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/preset-html5": {
|
||||
"version": "2.5.6",
|
||||
"version": "file:../bbob-preset-html5",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.6",
|
||||
"@bbob/preset": "^2.5.6"
|
||||
"@bbob/html": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2",
|
||||
"@bbob/preset": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/html": {
|
||||
"version": "file:../bbob-html",
|
||||
"requires": {
|
||||
"@bbob/core": "^2.5.6",
|
||||
"@bbob/plugin-helper": "^2.5.6"
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/core": {
|
||||
"version": "2.5.6",
|
||||
"version": "file:../bbob-core",
|
||||
"requires": {
|
||||
"@bbob/parser": "^2.5.6"
|
||||
"@bbob/parser": "^2.8.2"
|
||||
},
|
||||
"dependencies": {}
|
||||
"dependencies": {
|
||||
"@bbob/parser": {
|
||||
"version": "file:../bbob-parser",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.6"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.6"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
},
|
||||
"@bbob/preset": {
|
||||
"version": "2.5.6",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.6"
|
||||
}
|
||||
}
|
||||
"version": "file:../bbob-preset"
|
||||
}
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
|
||||
"version": "2.17.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,5 @@
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/core
|
||||
|
||||
Generated
+35
-4
@@ -1,17 +1,48 @@
|
||||
{
|
||||
"name": "@bbob/core",
|
||||
"version": "2.8.2",
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@bbob/core",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/parser": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-parser": {
|
||||
"name": "@bbob/parser",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-parser/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-plugin-helper": {
|
||||
"name": "@bbob/plugin-helper",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@bbob/parser": {
|
||||
"resolved": "../bbob-parser",
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/parser": {
|
||||
"version": "2.5.4",
|
||||
"version": "file:../bbob-parser",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.4"
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/html
|
||||
|
||||
Generated
+62
-14
@@ -1,30 +1,78 @@
|
||||
{
|
||||
"name": "@bbob/html",
|
||||
"version": "2.8.2",
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@bbob/core": {
|
||||
"version": "2.5.4",
|
||||
"resolved": "https://registry.npmjs.org/@bbob/core/-/core-2.5.4.tgz",
|
||||
"integrity": "sha512-8M/xQkU84XvXw82vBhLFukRWTyTSFoGBmCe3nuE62z4wRaYmmg+B9GYGZv6rM6KNva5UyOi5zVQhgpw7fYH5rg==",
|
||||
"requires": {
|
||||
"@bbob/parser": "^2.5.4"
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@bbob/html",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"@bbob/parser": {
|
||||
"version": "2.5.4",
|
||||
"../bbob-core": {
|
||||
"name": "@bbob/core",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/parser": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-core/node_modules/@bbob/parser": {
|
||||
"resolved": "../bbob-parser",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-parser": {
|
||||
"name": "@bbob/parser",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-parser/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-plugin-helper": {
|
||||
"name": "@bbob/plugin-helper",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@bbob/core": {
|
||||
"resolved": "../bbob-core",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/core": {
|
||||
"version": "file:../bbob-core",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.4"
|
||||
"@bbob/parser": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
"@bbob/parser": {
|
||||
"version": "file:../bbob-parser",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bbob plugin helper imports ([5f76548](https://github.com/JiLiZART/bbob/commit/5f76548b78b29f0905f74804e4a1d0634f085c1b))
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/parser
|
||||
|
||||
Generated
+21
-2
@@ -1,11 +1,30 @@
|
||||
{
|
||||
"name": "@bbob/parser",
|
||||
"version": "2.8.2",
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@bbob/parser",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-plugin-helper": {
|
||||
"name": "@bbob/plugin-helper",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"bundlesize": [
|
||||
{
|
||||
"path": "./dist/index.min.js",
|
||||
"threshold": "2.7 KB"
|
||||
"maxSize": "3 KB"
|
||||
}
|
||||
],
|
||||
"publishConfig": {
|
||||
@@ -61,6 +61,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
OPEN_BRAKET,
|
||||
CLOSE_BRAKET,
|
||||
SLASH,
|
||||
} from '@bbob/plugin-helper/lib/char';
|
||||
} from '@bbob/plugin-helper';
|
||||
|
||||
// type, value, line, row,
|
||||
const TOKEN_TYPE_ID = 'type'; // 0;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export { TagNode } from '@bbob/plugin-helper';
|
||||
export { default, parse } from './parse';
|
||||
export { TagNode } from '@bbob/plugin-helper/lib/TagNode';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
TAB,
|
||||
EQ,
|
||||
N,
|
||||
} from '@bbob/plugin-helper/lib/char';
|
||||
} from '@bbob/plugin-helper';
|
||||
|
||||
import {
|
||||
Token, TYPE_ATTR_NAME, TYPE_ATTR_VALUE, TYPE_NEW_LINE, TYPE_SPACE, TYPE_TAG, TYPE_WORD,
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
TAB,
|
||||
EQ,
|
||||
N,
|
||||
} from '@bbob/plugin-helper/lib/char';
|
||||
} from '@bbob/plugin-helper';
|
||||
|
||||
import {
|
||||
Token, TYPE_ATTR_NAME, TYPE_ATTR_VALUE, TYPE_NEW_LINE, TYPE_SPACE, TYPE_TAG, TYPE_WORD,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import TagNode from '@bbob/plugin-helper/lib/TagNode';
|
||||
import { CLOSE_BRAKET, OPEN_BRAKET } from '@bbob/plugin-helper/lib/char';
|
||||
import { isTagNode } from '@bbob/plugin-helper/lib/index';
|
||||
import {
|
||||
TagNode, CLOSE_BRAKET, OPEN_BRAKET, isTagNode,
|
||||
} from '@bbob/plugin-helper';
|
||||
import { createLexer } from './lexer';
|
||||
import { createList } from './utils';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
QUOTEMARK,
|
||||
BACKSLASH,
|
||||
} from '@bbob/plugin-helper/lib/char';
|
||||
} from '@bbob/plugin-helper';
|
||||
|
||||
function CharGrabber(source, options) {
|
||||
const cursor = {
|
||||
|
||||
@@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bbob plugin helper imports ([5f76548](https://github.com/JiLiZART/bbob/commit/5f76548b78b29f0905f74804e4a1d0634f085c1b))
|
||||
* bundle size limits ([edfdfed](https://github.com/JiLiZART/bbob/commit/edfdfedd06214ec9769f892407153d5b023e35aa))
|
||||
* code ql ([d6cbafe](https://github.com/JiLiZART/bbob/commit/d6cbafe8ba24e1e837333e644073a0e76c3eed07))
|
||||
* plugin helper build priority and circular deps ([cac47c6](https://github.com/JiLiZART/bbob/commit/cac47c6fc7e30c419691f7e8bc33f118211fc044))
|
||||
* remove exports directive ([a6efc40](https://github.com/JiLiZART/bbob/commit/a6efc4023b5cb09b56436a0dbe698423b2feecf1))
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/plugin-helper
|
||||
|
||||
+9
-1
@@ -1,5 +1,13 @@
|
||||
{
|
||||
"name": "@bbob/plugin-helper",
|
||||
"version": "2.8.2",
|
||||
"lockfileVersion": 1
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@bbob/plugin-helper",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"bundlesize": [
|
||||
{
|
||||
"path": "./dist/index.min.js",
|
||||
"maxSize": "850 B"
|
||||
"maxSize": "1024 B"
|
||||
}
|
||||
],
|
||||
"publishConfig": {
|
||||
@@ -53,6 +53,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { OPEN_BRAKET, CLOSE_BRAKET, SLASH } from './char';
|
||||
import {
|
||||
getNodeLength, appendToNode, attrsToString, attrValue, getUniqAttr,
|
||||
} from './index';
|
||||
} from './helpers';
|
||||
|
||||
const getTagAttrs = (tag, params) => {
|
||||
const uniqAattr = getUniqAttr(params);
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
import { N } from './char';
|
||||
|
||||
const isTagNode = (el) => typeof el === 'object' && !!el.tag;
|
||||
const isStringNode = (el) => typeof el === 'string';
|
||||
const isEOL = (el) => el === N;
|
||||
|
||||
const keysReduce = (obj, reduce, def) => Object.keys(obj).reduce(reduce, def);
|
||||
|
||||
const getNodeLength = (node) => {
|
||||
if (isTagNode(node)) {
|
||||
return node.content.reduce((count, contentNode) => count + getNodeLength(contentNode), 0);
|
||||
} if (isStringNode(node)) {
|
||||
return node.length;
|
||||
}
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Appends value to Tag Node
|
||||
* @param {TagNode} node
|
||||
* @param value
|
||||
*/
|
||||
const appendToNode = (node, value) => {
|
||||
node.content.push(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* Replaces " to &qquot;
|
||||
* @param {String} value
|
||||
*/
|
||||
const escapeHTML = (value) => value
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
// eslint-disable-next-line no-script-url
|
||||
.replace(/(javascript|data|vbscript):/gi, '$1%3A');
|
||||
|
||||
/**
|
||||
* Acept name and value and return valid html5 attribute string
|
||||
* @param {String} name
|
||||
* @param {String} value
|
||||
* @return {string}
|
||||
*/
|
||||
const attrValue = (name, value) => {
|
||||
const type = typeof value;
|
||||
|
||||
const types = {
|
||||
boolean: () => (value ? `${name}` : ''),
|
||||
number: () => `${name}="${value}"`,
|
||||
string: () => `${name}="${escapeHTML(value)}"`,
|
||||
object: () => `${name}="${escapeHTML(JSON.stringify(value))}"`,
|
||||
};
|
||||
|
||||
return types[type] ? types[type]() : '';
|
||||
};
|
||||
|
||||
/**
|
||||
* Transforms attrs to html params string
|
||||
* @param values
|
||||
*/
|
||||
const attrsToString = (values) => {
|
||||
// To avoid some malformed attributes
|
||||
if (values == null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return keysReduce(
|
||||
values,
|
||||
(arr, key) => [...arr, attrValue(key, values[key])],
|
||||
[''],
|
||||
).join(' ');
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets value from
|
||||
* @example
|
||||
* getUniqAttr({ 'foo': true, 'bar': bar' }) => 'bar'
|
||||
* @param attrs
|
||||
* @returns {string}
|
||||
*/
|
||||
const getUniqAttr = (attrs) => keysReduce(
|
||||
attrs,
|
||||
(res, key) => (attrs[key] === key ? attrs[key] : null),
|
||||
null,
|
||||
);
|
||||
|
||||
export {
|
||||
attrsToString,
|
||||
attrValue,
|
||||
appendToNode,
|
||||
escapeHTML,
|
||||
getNodeLength,
|
||||
getUniqAttr,
|
||||
isTagNode,
|
||||
isStringNode,
|
||||
isEOL,
|
||||
};
|
||||
@@ -1,100 +1,3 @@
|
||||
import { N } from './char';
|
||||
|
||||
const isTagNode = (el) => typeof el === 'object' && !!el.tag;
|
||||
const isStringNode = (el) => typeof el === 'string';
|
||||
const isEOL = (el) => el === N;
|
||||
|
||||
const keysReduce = (obj, reduce, def) => Object.keys(obj).reduce(reduce, def);
|
||||
|
||||
const getNodeLength = (node) => {
|
||||
if (isTagNode(node)) {
|
||||
return node.content.reduce((count, contentNode) => count + getNodeLength(contentNode), 0);
|
||||
} if (isStringNode(node)) {
|
||||
return node.length;
|
||||
}
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Appends value to Tag Node
|
||||
* @param {TagNode} node
|
||||
* @param value
|
||||
*/
|
||||
const appendToNode = (node, value) => {
|
||||
node.content.push(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* Replaces " to &qquot;
|
||||
* @param {String} value
|
||||
*/
|
||||
const escapeHTML = (value) => value
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
// eslint-disable-next-line no-script-url
|
||||
.replace(/(javascript):/gi, '$1%3A');
|
||||
|
||||
/**
|
||||
* Acept name and value and return valid html5 attribute string
|
||||
* @param {String} name
|
||||
* @param {String} value
|
||||
* @return {string}
|
||||
*/
|
||||
const attrValue = (name, value) => {
|
||||
const type = typeof value;
|
||||
|
||||
const types = {
|
||||
boolean: () => (value ? `${name}` : ''),
|
||||
number: () => `${name}="${value}"`,
|
||||
string: () => `${name}="${escapeHTML(value)}"`,
|
||||
object: () => `${name}="${escapeHTML(JSON.stringify(value))}"`,
|
||||
};
|
||||
|
||||
return types[type] ? types[type]() : '';
|
||||
};
|
||||
|
||||
/**
|
||||
* Transforms attrs to html params string
|
||||
* @param values
|
||||
*/
|
||||
const attrsToString = (values) => {
|
||||
// To avoid some malformed attributes
|
||||
if (values == null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return keysReduce(
|
||||
values,
|
||||
(arr, key) => [...arr, attrValue(key, values[key])],
|
||||
[''],
|
||||
).join(' ');
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets value from
|
||||
* @example
|
||||
* getUniqAttr({ 'foo': true, 'bar': bar' }) => 'bar'
|
||||
* @param attrs
|
||||
* @returns {string}
|
||||
*/
|
||||
const getUniqAttr = (attrs) => keysReduce(
|
||||
attrs,
|
||||
(res, key) => (attrs[key] === key ? attrs[key] : null),
|
||||
null,
|
||||
);
|
||||
|
||||
export {
|
||||
attrsToString,
|
||||
attrValue,
|
||||
appendToNode,
|
||||
escapeHTML,
|
||||
getNodeLength,
|
||||
getUniqAttr,
|
||||
isTagNode,
|
||||
isStringNode,
|
||||
isEOL,
|
||||
};
|
||||
export * from './helpers';
|
||||
export * from './char';
|
||||
export { TagNode } from './TagNode';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import TagNode from '../src/TagNode'
|
||||
import { TagNode } from '../src'
|
||||
|
||||
describe('@bbob/plugin-helper/lib/TagNode', () => {
|
||||
describe('@bbob/plugin-helper/TagNode', () => {
|
||||
test('create', () => {
|
||||
const tagNode = TagNode.create('test', {test: 1}, ['Hello']);
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import {
|
||||
isEOL,
|
||||
} from '../src';
|
||||
|
||||
describe('@bbob/plugin-helper', () => {
|
||||
describe('@bbob/plugin-helper/helpers', () => {
|
||||
test('appendToNode', () => {
|
||||
const value = 'test';
|
||||
const node = { content: [] };
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bbob plugin helper imports ([5f76548](https://github.com/JiLiZART/bbob/commit/5f76548b78b29f0905f74804e4a1d0634f085c1b))
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/preset-html5
|
||||
|
||||
+99
-32
@@ -1,58 +1,125 @@
|
||||
{
|
||||
"name": "@bbob/preset-html5",
|
||||
"version": "2.8.2",
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@bbob/preset-html5",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2",
|
||||
"@bbob/preset": "^2.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bbob/html": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-core": {
|
||||
"name": "@bbob/core",
|
||||
"version": "2.8.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/parser": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-core/node_modules/@bbob/parser": {
|
||||
"resolved": "../bbob-parser",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-html": {
|
||||
"name": "@bbob/html",
|
||||
"version": "2.8.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-html/node_modules/@bbob/core": {
|
||||
"resolved": "../bbob-core",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-html/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-parser": {
|
||||
"name": "@bbob/parser",
|
||||
"version": "2.8.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-parser/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-plugin-helper": {
|
||||
"name": "@bbob/plugin-helper",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"../bbob-preset": {
|
||||
"name": "@bbob/preset",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@bbob/html": {
|
||||
"resolved": "../bbob-html",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bbob/preset": {
|
||||
"resolved": "../bbob-preset",
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/html": {
|
||||
"version": "2.5.4",
|
||||
"dev": true,
|
||||
"version": "file:../bbob-html",
|
||||
"requires": {
|
||||
"@bbob/core": "^2.5.4",
|
||||
"@bbob/plugin-helper": "^2.5.4"
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/core": {
|
||||
"version": "2.5.4",
|
||||
"resolved": "https://registry.npmjs.org/@bbob/core/-/core-2.5.4.tgz",
|
||||
"integrity": "sha512-8M/xQkU84XvXw82vBhLFukRWTyTSFoGBmCe3nuE62z4wRaYmmg+B9GYGZv6rM6KNva5UyOi5zVQhgpw7fYH5rg==",
|
||||
"dev": true,
|
||||
"version": "file:../bbob-core",
|
||||
"requires": {
|
||||
"@bbob/parser": "^2.5.4"
|
||||
}
|
||||
},
|
||||
"@bbob/parser": {
|
||||
"version": "2.5.4",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.4"
|
||||
"@bbob/parser": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4",
|
||||
"dev": true
|
||||
"@bbob/parser": {
|
||||
"version": "file:../bbob-parser",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4",
|
||||
"dev": true
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
},
|
||||
"@bbob/preset": {
|
||||
"version": "2.5.4",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
}
|
||||
}
|
||||
"version": "file:../bbob-preset"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* eslint-disable no-plusplus,no-lonely-if */
|
||||
import { getUniqAttr, isStringNode, isTagNode } from '@bbob/plugin-helper/lib/index';
|
||||
import TagNode from '@bbob/plugin-helper/lib/TagNode';
|
||||
import {
|
||||
getUniqAttr, isStringNode, isTagNode, TagNode,
|
||||
} from '@bbob/plugin-helper';
|
||||
|
||||
const isStartsWith = (node, type) => (node[0] === type);
|
||||
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/preset-react
|
||||
|
||||
+127
-36
@@ -1,80 +1,171 @@
|
||||
{
|
||||
"name": "@bbob/preset-react",
|
||||
"version": "2.8.2",
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@bbob/preset-react",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/preset-html5": "^2.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bbob/core": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-core": {
|
||||
"name": "@bbob/core",
|
||||
"version": "2.8.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/parser": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-core/node_modules/@bbob/parser": {
|
||||
"resolved": "../bbob-parser",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-html": {
|
||||
"name": "@bbob/html",
|
||||
"version": "2.8.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-html/node_modules/@bbob/core": {
|
||||
"resolved": "../bbob-core",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-html/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-parser": {
|
||||
"name": "@bbob/parser",
|
||||
"version": "2.8.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-parser/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-plugin-helper": {
|
||||
"name": "@bbob/plugin-helper",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"../bbob-preset": {
|
||||
"name": "@bbob/preset",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"../bbob-preset-html5": {
|
||||
"name": "@bbob/preset-html5",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2",
|
||||
"@bbob/preset": "^2.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bbob/html": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-preset-html5/node_modules/@bbob/html": {
|
||||
"resolved": "../bbob-html",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-preset-html5/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-preset-html5/node_modules/@bbob/preset": {
|
||||
"resolved": "../bbob-preset",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bbob/core": {
|
||||
"resolved": "../bbob-core",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bbob/preset-html5": {
|
||||
"resolved": "../bbob-preset-html5",
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/core": {
|
||||
"version": "2.5.4",
|
||||
"dev": true,
|
||||
"version": "file:../bbob-core",
|
||||
"requires": {
|
||||
"@bbob/parser": "^2.5.4"
|
||||
"@bbob/parser": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/parser": {
|
||||
"version": "2.5.4",
|
||||
"dev": true,
|
||||
"version": "file:../bbob-parser",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.4"
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/preset-html5": {
|
||||
"version": "2.5.4",
|
||||
"version": "file:../bbob-preset-html5",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.4",
|
||||
"@bbob/preset": "^2.5.4"
|
||||
"@bbob/html": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2",
|
||||
"@bbob/preset": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/html": {
|
||||
"version": "file:../bbob-html",
|
||||
"requires": {
|
||||
"@bbob/core": "^2.5.4",
|
||||
"@bbob/plugin-helper": "^2.5.4"
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/core": {
|
||||
"version": "2.5.4",
|
||||
"resolved": "https://registry.npmjs.org/@bbob/core/-/core-2.5.4.tgz",
|
||||
"integrity": "sha512-8M/xQkU84XvXw82vBhLFukRWTyTSFoGBmCe3nuE62z4wRaYmmg+B9GYGZv6rM6KNva5UyOi5zVQhgpw7fYH5rg==",
|
||||
"version": "file:../bbob-core",
|
||||
"requires": {
|
||||
"@bbob/parser": "^2.5.4"
|
||||
}
|
||||
},
|
||||
"@bbob/parser": {
|
||||
"version": "2.5.4",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.4"
|
||||
"@bbob/parser": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
"@bbob/parser": {
|
||||
"version": "file:../bbob-parser",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
},
|
||||
"@bbob/preset": {
|
||||
"version": "2.5.4",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.5.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "2.5.4"
|
||||
}
|
||||
}
|
||||
"version": "file:../bbob-preset"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/preset-vue
|
||||
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
{
|
||||
"name": "@bbob/preset-vue",
|
||||
"version": "2.8.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@bbob/preset-vue",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/preset-html5": "^2.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bbob/core": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-core": {
|
||||
"name": "@bbob/core",
|
||||
"version": "2.8.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/parser": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-core/node_modules/@bbob/parser": {
|
||||
"resolved": "../bbob-parser",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-html": {
|
||||
"name": "@bbob/html",
|
||||
"version": "2.8.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-html/node_modules/@bbob/core": {
|
||||
"resolved": "../bbob-core",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-html/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-parser": {
|
||||
"name": "@bbob/parser",
|
||||
"version": "2.8.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-parser/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-plugin-helper": {
|
||||
"name": "@bbob/plugin-helper",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"../bbob-preset": {
|
||||
"name": "@bbob/preset",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"../bbob-preset-html5": {
|
||||
"name": "@bbob/preset-html5",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": "^2.8.2",
|
||||
"@bbob/preset": "^2.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bbob/html": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"../bbob-preset-html5/node_modules/@bbob/html": {
|
||||
"resolved": "../bbob-html",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-preset-html5/node_modules/@bbob/plugin-helper": {
|
||||
"resolved": "../bbob-plugin-helper",
|
||||
"link": true
|
||||
},
|
||||
"../bbob-preset-html5/node_modules/@bbob/preset": {
|
||||
"resolved": "../bbob-preset",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bbob/core": {
|
||||
"resolved": "../bbob-core",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bbob/preset-html5": {
|
||||
"resolved": "../bbob-preset-html5",
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/core": {
|
||||
"version": "file:../bbob-core",
|
||||
"requires": {
|
||||
"@bbob/parser": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/parser": {
|
||||
"version": "file:../bbob-parser",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/preset-html5": {
|
||||
"version": "file:../bbob-preset-html5",
|
||||
"requires": {
|
||||
"@bbob/html": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2",
|
||||
"@bbob/preset": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/html": {
|
||||
"version": "file:../bbob-html",
|
||||
"requires": {
|
||||
"@bbob/core": "^2.8.2",
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/core": {
|
||||
"version": "file:../bbob-core",
|
||||
"requires": {
|
||||
"@bbob/parser": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/parser": {
|
||||
"version": "file:../bbob-parser",
|
||||
"requires": {
|
||||
"@bbob/plugin-helper": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@bbob/plugin-helper": {
|
||||
"version": "file:../bbob-plugin-helper"
|
||||
},
|
||||
"@bbob/preset": {
|
||||
"version": "file:../bbob-preset"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/preset
|
||||
|
||||
Generated
+9
-1
@@ -1,5 +1,13 @@
|
||||
{
|
||||
"name": "@bbob/preset",
|
||||
"version": "2.8.2",
|
||||
"lockfileVersion": 1
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@bbob/preset",
|
||||
"version": "2.8.2",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
|
||||
|
||||
Generated
+291
-344
File diff suppressed because it is too large
Load Diff
@@ -69,6 +69,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.3](https://github.com/JiLiZART/bbob/compare/v2.8.2...v2.8.3) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove gitHead from package.json ([2b3ffa9](https://github.com/JiLiZART/bbob/commit/2b3ffa93233decdb3f2c93e91bd93582525f9210))
|
||||
* vue2 test and minify ([af3ba58](https://github.com/JiLiZART/bbob/commit/af3ba58c40717f07ce5be4a6df0aaa6f791e81f0))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.8.2](https://github.com/JiLiZART/bbob/compare/v2.8.1...v2.8.2) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @bbob/vue2
|
||||
|
||||
Generated
+1571
-694
File diff suppressed because it is too large
Load Diff
@@ -18,9 +18,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bbob/preset-vue": "^2.8.2",
|
||||
"@testing-library/vue": "5.6.2",
|
||||
"vue": "2.6.12",
|
||||
"vue-template-compiler": "2.6.12"
|
||||
"@testing-library/vue": "5.8.3",
|
||||
"vue": "2.7.14",
|
||||
"vue-template-compiler": "2.7.14"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -67,6 +67,5 @@
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
],
|
||||
"gitHead": "01b0916b4a92c14e205397bebd58cf9c691cd540"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
import { defineConfig } from 'rollup';
|
||||
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import replace from '@rollup/plugin-replace'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import { minify } from 'rollup-plugin-swc3'
|
||||
|
||||
import { createRequire } from 'node:module';
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
// eslint-disable-next-line import/no-dynamic-require
|
||||
const pkg = require(`${process.cwd()}/package.json`);
|
||||
const { NODE_ENV } = process.env;
|
||||
|
||||
@@ -22,7 +28,10 @@ const baseConfig = {
|
||||
},
|
||||
plugins: [
|
||||
resolve(),
|
||||
commonjs(),
|
||||
commonjs({
|
||||
transformMixedEsModules: true,
|
||||
requireReturnsDefault: true,
|
||||
}),
|
||||
replace({
|
||||
preventAssignment: true,
|
||||
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
|
||||
@@ -31,7 +40,7 @@ const baseConfig = {
|
||||
};
|
||||
|
||||
// only for dist
|
||||
export default [
|
||||
export default defineConfig([
|
||||
baseConfig,
|
||||
{
|
||||
...baseConfig,
|
||||
@@ -41,14 +50,15 @@ export default [
|
||||
},
|
||||
plugins: [
|
||||
...baseConfig.plugins,
|
||||
terser({
|
||||
minify({
|
||||
compress: {
|
||||
pure_getters: true,
|
||||
unsafe: true,
|
||||
unsafe_comps: true,
|
||||
warnings: false,
|
||||
inline: true,
|
||||
keep_classnames: true,
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
];
|
||||
]);
|
||||
Generated
+18
-1
@@ -1,6 +1,23 @@
|
||||
{
|
||||
"name": "scripts",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "scripts",
|
||||
"dependencies": {
|
||||
"commander": "8.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-8.2.0.tgz",
|
||||
"integrity": "sha512-LLKxDvHeL91/8MIyTAD5BFMNtoIwztGPMiM/7Bl8rIPmHCZXRxmSWr91h57dpOpnQ6jIUqEWdXE/uBYMfiVZDA==",
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "8.2.0",
|
||||
|
||||
+17
-9
@@ -2,17 +2,17 @@
|
||||
'use strict';
|
||||
const { resolve } = require('path')
|
||||
const { spawn } = require('child_process')
|
||||
const { Command } = require('commander');
|
||||
const pkg = require(resolve(__dirname, '../package.json'))
|
||||
|
||||
const program = new Command();
|
||||
const pkg = require(resolve(__dirname, '../package.json'))
|
||||
const nmBinDir = resolve(__dirname, '../node_modules/.bin/')
|
||||
|
||||
const shell = { cmd: 'sh', arg: '-c' }
|
||||
|
||||
// replace all @/ to node modules bin dir
|
||||
const replaceTokens = str => String(str).replace(new RegExp('@\\/', 'gi'), `${nmBinDir}/`)
|
||||
|
||||
const actionCommand = (command) => () => {
|
||||
const proc = spawn(shell.cmd, [shell.arg, replaceTokens(command)], {
|
||||
function runCommand(command, args = '') {
|
||||
const proc = spawn(shell.cmd, [shell.arg, `${replaceTokens(command)} ${args}`], {
|
||||
env: process.env,
|
||||
cwd: process.cwd(),
|
||||
stdio: 'inherit',
|
||||
@@ -27,10 +27,18 @@ const actionCommand = (command) => () => {
|
||||
});
|
||||
}
|
||||
|
||||
program.version('1.0.0')
|
||||
function runCommandByKey(key, command) {
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
for (const [key, command] of Object.entries(pkg.pkgTasks)) {
|
||||
program.command(key).action(actionCommand(command))
|
||||
if (args.length >= 1) {
|
||||
const [name, ...argarr] = args
|
||||
|
||||
if (name === key) {
|
||||
return runCommand(command, argarr.join(' '))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
program.parse();
|
||||
for (const [key, command] of Object.entries(pkg.pkgTasks)) {
|
||||
runCommandByKey(key, command)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user