2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00
Commit Graph

199 Commits

Author SHA1 Message Date
Nikolay Kostyurin 1906c3cd01 chore(release): publish v2.6.2 (#85) 2020-12-17 00:07:56 +02:00
Nikolay Kostyurin cad0e9e7f4 perf(parser): cache nested tokens in Set to prevent deoptimization (#83) 2020-12-16 23:55:17 +02:00
Nikolay Kostyurin 70ff2e6660 fix(parser): dont process nested tags as string if parent is not allowed (#84)
* fix(parser): dont process nested tags as string if parent is not allowed

* fix(plugin-helper): toString method with default params
2020-12-16 23:51:28 +02:00
Nikolay Kostyurin 0d839fa947 chore(readme): add benchmark stats 2020-12-16 03:33:15 +02:00
Nikolay Kostyurin c9aa6b368b chore(release): publish v2.6.1 (#82) 2020-12-16 00:41:01 +02:00
Nikolay Kostyurin 09bda26d7c fix(parser): tag inside tag parsing regression (#81) 2020-12-16 00:29:26 +02:00
dependabot[bot] b131d5f78d chore(deps): bump ini from 1.3.5 to 1.3.7 (#80)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-11 09:22:32 +02:00
Nikolay Kostyurin 69018b1b1d chore(release): publish v2.6.0 (#79) 2020-12-10 22:36:11 +02:00
Nikolay Kostyurin 772d422d77 feat(parser): rewrite lexer to make it faster (#50)
* feat(parser): first iteration of new lexer

* feat(parser): convert token string props to number props

* refactor(parser): optimize char grabber

* refactor(parser): working on new lexer

* refactor(parser): convert token string props to number props

* refactor(parser): rebuild lexer, add tag attrs parsing

* refactor(parser): rework word parsing and tag parsing

* refactor(parser): rework to pass tests

* refactor(parser): rework tag parsing

* refactor(parser): rework escape tags parsing

* refactor(parser): rework tests

* refactor(parser): all test pass

* refactor(parser): make lexer faster by move mode switching in loop

* refactor(parser): remove all state map objects

* refactor(parser): order of parsing states

* refactor(parser): state switching without return

* refactor(parser): rename buffers to chars

* refactor(lexer): reduce function calls

* feat(lexer): add new parser tests and code to pass it

* fix(utils): remove unused variable in char grabber

* feat(lexer): add test for new lexer bug

* chore(*): add lexer and lexer2 to benchmark

* chore(lexer): add some debug info for char grabber

* feat(parser): add new test for single attributes without values

* fix(lexer): paired tags tests

* refactor(lexer): comment breaking changes tests for future releases

* feat(core): improve tests

* refactor(parser): add more tests, reduce char grabber size

* refactor(parser): reduce utils size

* refactor(parser): remove unused code from tag parsing code

* refactor(parser): remove unused code from word to tag transforming code

* chore(benchmark): fix benchmark imports
2020-12-09 01:03:48 +02:00
Nikolay Kostyurin fda6ddd6ee refactor: reduce dist files sizes (#76)
* fix(parser): plugin-helper import, remove dist file code duplication

* feat(plugin-helper): reduce bundle size, set new limits to 650 bytes

* refactor(preset): html5, react presets to reduce the size of dist files
2020-12-09 00:01:34 +02:00
Nikolay Kostyurin 4e79abb833 chore(release): publish v2.5.9 (#75) 2020-11-16 23:14:33 +02:00
Nikolay Kostyurin 5a7211db91 fix(react): rendering self-closed tags and tags without content (#74) 2020-11-16 22:59:08 +02:00
dependabot[bot] 9c71bb5f26 chore(deps): bump elliptic from 6.5.2 to 6.5.3 (#69)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikolay Kostyurin <JiLiZART@Gmail.com>
2020-10-03 10:40:51 +02:00
dependabot[bot] efaaa57b6f chore(deps): bump bl from 4.0.2 to 4.0.3 (#70)
Bumps [bl](https://github.com/rvagg/bl) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v4.0.2...v4.0.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikolay Kostyurin <JiLiZART@Gmail.com>
2020-10-03 10:40:35 +02:00
Nikolay Kostyurin 3fcb5c50a1 chore: add CodeQL analysis 2020-10-03 10:21:46 +02:00
dependabot[bot] b60958d5c5 chore(deps): bump lodash from 4.17.15 to 4.17.19 in /packages/bbob-react (#68)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 16:33:37 +02:00
Nikolay Kostyurin cbaa9c6b0d chore: update readme 2020-07-20 13:30:16 +02:00
Nikolay Kostyurin 2eb1fbcccf chore(release): publish v2.5.8 v2.5.8 2020-07-08 19:34:55 +02:00
Nikolay Kostyurin 5ceb2f0fa4 fix(plugin-helper): escape case insensitive javascript: attrs 2020-07-08 19:34:12 +02:00
Nikolay Kostyurin fe6a16b6d9 chore(release): publish v2.5.7 v2.5.7 2020-07-05 15:24:30 +02:00
Nikolay Kostyurin 87f38fe97e fix(html): escape bad html (#67)
* feat(preset-html5): add feature to filter javascript: urls

* fix(plugin-helper): escape html in attrs

* fix(plugin-helper): tests for html escape

* refactor(preset-html5): remove html escape from preset

* feat(preset): add ability to pass and extend preset options
2020-07-05 15:23:22 +02:00
Nikolay Kostyurin ba090bf997 chore(bbob): update lock files (#64) 2020-05-30 00:38:27 +02:00
Nikolay Kostyurin 5af63e4158 chore(release): publish v2.5.6 v2.5.6 2020-04-12 21:37:50 +02:00
Nikolay Kostyurin a16b9f73b0 fix(parser): don't eat not allowed tags with params (#58) fixes #54
* feat(parser): write test for only allowed tags parsing

* chore(parser): rename only allowed test

* fix(parser): only allowed tag rendering

* fix(plugin-helper): add new TagNode toString tests
2020-04-12 21:14:52 +02:00
Nikolay Kostyurin f28f19e64c feat(plugin-helper): move getUniqAttr from preset to plugin helper (#63) 2020-04-12 16:18:47 +02:00
Nikolay Kostyurin 2cfe729d75 chore(readme): change travis badge to .com version 2020-04-05 19:40:57 +02:00
Nikolay Kostyurin 22237c4500 chore(benchmark): add ya-bbcode as benchmark target in benchmark suite (#62) 2020-04-05 17:50:49 +02:00
Nikolay Kostyurin 97ecba0af6 perf(parser): optimize v8 perf deoptimizations (#61) 2020-04-05 15:08:59 +02:00
Nikolay Kostyurin e3727dc5f5 chore(readme): update codesandbox examples 2020-03-26 01:00:52 +02:00
Nikolay Kostyurin 2670fc1288 chore(release): publish v2.5.5 v2.5.5 2020-03-26 00:51:02 +02:00
Nikolay Kostyurin 0a213abbf7 chore(lerna): add options for commit message and publishing 2020-03-26 00:47:00 +02:00
Vladimir 0b74be7830 feat(core): allow to pass dynamic data in options for render (#59) 2020-03-16 14:37:36 +02:00
Nikolay Kostyurin aac1ae0e81 chore(*): update dependencies (#57)
Updated Rollup
Updated Babel
Fixed security problems with some dependencies
2020-01-22 20:25:42 +02:00
dependabot[bot] cdc7f66e21 chore(deps): bump handlebars from 4.1.2 to 4.5.3 (#53)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-01-07 18:38:32 +02:00
Nikolay Kostyurin b6744e9758 v2.5.4 (#51) v2.5.4 2019-09-25 09:34:56 +02:00
Nikolay Kostyurin be938fd21f fix(parser): try to hack terser minifier that removes working code (#49)
* fix(parser): try to hack terser minifier that removes working code Fixes #48
2019-09-25 09:29:21 +02:00
dependabot[bot] 2c1fbffeb0 chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 (#46)
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-09-20 10:03:31 +02:00
Nikolay Kostyurin 50adc1c056 chore: v2.5.3 (#44) 2019-08-11 15:32:07 +02:00
Nikolay Kostyurin 597c2a9008 feat(plugin-helper): lowercase resulting tag names (#42) 2019-07-28 15:28:46 +02:00
dependabot[bot] 001de51f34 chore(deps): bump lodash from 4.17.10 to 4.17.15 (#41)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.10 to 4.17.15.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.10...4.17.15)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-20 11:54:19 +02:00
Nikolay Kostyurin 18fa3e9961 chore: ignore benchmark files in Linguist (#40) 2019-07-12 16:11:48 +02:00
Nikolay Kostyurin 2827a3edd7 chore: git ignore html5 benchmark files (#39) 2019-07-12 16:04:49 +02:00
dependabot[bot] 34a7753301 chore(deps): bump lodash.template from 4.4.0 to 4.5.0 (#38)
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.4.0...4.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-11 13:20:43 +02:00
Nikolay Kostyurin 39d0564b0e chore: v2.5.2 (#33) 2019-06-30 11:41:49 +02:00
Nikolay Kostyurin b4cf27127f fix(parser): infinity loop problem when escape [\b] (#31)
With enableEscapeTags: true, when trying to write [b]test[\b] page is crashed.
Fixes #23
2019-06-30 11:15:10 +02:00
Greg Venech 3d5c1f19d5 fix(bbob-react): remove unique "key" prop warning (#30)
When using `@bbob/react`s `<BBCode>` component, the following error is thrown
if this change is not included...

```
Warning: Each child in a list should have a unique "key" prop.
```

Mentioned in #28
2019-06-29 18:18:39 +02:00
Greg Venech aac6358d53 docs: correct react preset usage (#29)
Users need to spread the `tags` parameter in order to properly `extend` a
preset. You can see the internals of `preset-react` for another example.
2019-06-29 13:29:04 +02:00
Greg Venech 19d7ff20f1 fix(react): fix broken prop type definition (#27)
You need to pass a valid prop checking function to `PropTypes.arrayOf`. This caused
an error to be thrown in development for me:

```
Warning: Failed prop type: Unexpected token function
```
2019-06-28 10:00:35 +02:00
Vladimir 09ff9af9a2 fix(plugin-helper): avoid some malformed attributes in attrsToString (#26)
* attrsToString: To avoid some malformed attributes

Error:
```
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at attrsToString
```

This errors appears if no `attrs` setted in custom tag:
```
const BBcodePresetTemp = BbobPresetHTML5.extend((tags: any) => {
	tags.br = () => ({
		tag: 'br',
		// attrs: {}, // <-- Comment this line for error and add [br] to text
		content: null,
	});

	return tags;
});
```
2019-06-27 08:49:28 +02:00
Nikolay Kostyurin 5291543855 chore(bbob): add publish-patch npm command (#22) 2019-06-18 10:06:59 +02:00