mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 01:49:51 +08:00
fb647b6003
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [js-yaml](https://redirect.github.com/nodeca/js-yaml) | [`^4.2.0` → `^5.0.0`](https://renovatebot.com/diffs/npm/js-yaml/4.3.0/5.2.2) |  |  | --- ### js-yaml: Exponential parsing time in flow collections leads to denial of service [GHSA-pm4m-ph32-ghv5](https://redirect.github.com/advisories/GHSA-pm4m-ph32-ghv5) <details> <summary>More information</summary> #### Details ##### Summary Parsing a small YAML document can take exponential time. An application that calls `load()` or `loadAll()` on untrusted input can be hung by a payload under 200 bytes. ##### Details When an entry in a flow sequence turns out to be a `key: value` pair, the parser rewinds and parses that entry a second time as the key. If the key is itself a nested flow sequence of the same shape, every level is parsed twice, so the total work is O(2^n) in the nesting depth. The default `maxDepth` of 100 does not help, because the time is already unmanageable at about 30 to 40 levels. Root cause, potentially the: `readFlowCollection` in [parser.ts](https://redirect.github.com/nodeca/js-yaml/blob/master/src/parser/parser.ts), the `restoreState` followed by a second `parseNode` further down. ##### PoC ```javascript const yaml = require('js-yaml') const n = 30 yaml.load('[ '.repeat(n) + '1' + ' ]: 0'.repeat(n)) ``` With default options: 22 levels takes about 1 second, 26 levels about 17 seconds, 30 levels over 2 minutes. The input stays under 200 bytes and grows linearly with `n`. ##### Impact Denial of service. A single small request can keep one CPU busy for minutes or longer and blocks the Node event loop, so one request can stall the whole process. No anchors, aliases, merges, tags, or non default options are required, and it reproduces on the default schema. #### Severity - CVSS Score: 7.5 / 10 (High) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H` #### References - [https://github.com/nodeca/js-yaml/security/advisories/GHSA-pm4m-ph32-ghv5](https://redirect.github.com/nodeca/js-yaml/security/advisories/GHSA-pm4m-ph32-ghv5) - [https://github.com/nodeca/js-yaml/commit/3e5240f9cbe645ce5afb58524954a13c8539c853](https://redirect.github.com/nodeca/js-yaml/commit/3e5240f9cbe645ce5afb58524954a13c8539c853) - [https://github.com/nodeca/js-yaml/releases/tag/5.2.2](https://redirect.github.com/nodeca/js-yaml/releases/tag/5.2.2) - [https://github.com/advisories/GHSA-pm4m-ph32-ghv5](https://redirect.github.com/advisories/GHSA-pm4m-ph32-ghv5) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-pm4m-ph32-ghv5) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>nodeca/js-yaml (js-yaml)</summary> ### [`v5.2.2`](https://redirect.github.com/nodeca/js-yaml/blob/HEAD/CHANGELOG.md#522---2026-07-24) [Compare Source](https://redirect.github.com/nodeca/js-yaml/compare/5.2.1...5.2.2) ##### Fixed - Quote flow scalars where a colon precedes a flow indicator, [#​773](https://redirect.github.com/nodeca/js-yaml/issues/773). ##### Security - Avoid exponential parsing time for nested flow sequence pairs. ### [`v5.2.1`](https://redirect.github.com/nodeca/js-yaml/blob/HEAD/CHANGELOG.md#521---2026-07-02) [Compare Source](https://redirect.github.com/nodeca/js-yaml/compare/5.2.0...5.2.1) ##### Fixed - Add `Map` support to !!omap (should work when `realMapTag` used) ##### Security - Remove quadratic complexity from !!omap `addItem`. Regression from v5 (usually not critical, because YAML11\_SCHEMA is not default anymore). ### [`v5.2.0`](https://redirect.github.com/nodeca/js-yaml/blob/HEAD/CHANGELOG.md#520---2026-06-26) [Compare Source](https://redirect.github.com/nodeca/js-yaml/compare/5.1.0...5.2.0) ##### Added - Added `maxTotalMergeKeys` (10000) loader option to limit the total number of keys processed by YAML merge (`<<`) across one `load()` / `loadAll()` call. - Added `maxAliases` (-1) loader option to limit the number of YAML aliases per document. ##### Removed - `maxMergeSeqLength` replaced with `maxTotalMergeKeys` for limiting YAML merge processing. ##### Fixed - Round-trip of integers with exponential form (>= `1e21`) ### [`v5.1.0`](https://redirect.github.com/nodeca/js-yaml/blob/HEAD/CHANGELOG.md#510---2026-06-23) [Compare Source](https://redirect.github.com/nodeca/js-yaml/compare/5.0.0...5.1.0) ##### Added - Collection tags can finalize an incrementally populated carrier into a different result value. ##### Changed - \[breaking] `quoteStyle` now selects the preferred quote style; use the restored `forceQuotes` option to force quoting non-key strings. ### [`v5.0.0`](https://redirect.github.com/nodeca/js-yaml/blob/HEAD/CHANGELOG.md#500---2026-06-20) [Compare Source](https://redirect.github.com/nodeca/js-yaml/compare/4.3.0...5.0.0) ##### Added - Added named exports for schemas, tags, parser events and AST utilities. - Reworked `JSON_SCHEMA` and `CORE_SCHEMA` with spec-compliant scalar resolution rules, and added `YAML11_SCHEMA`. - Added `realMapTag` for lossless mappings with non-string and complex keys. Object-based mappings now reject complex keys instead of stringifying them. - Added `dump()` `transform` option for changing the generated AST before rendering. - Added `dump()` options `seqInlineFirst`, `flowBracketPadding`, `flowSkipCommaSpace`, `flowSkipColonSpace`, `quoteFlowKeys`, `quoteStyle` and `tagBeforeAnchor`. - Added formal data layers (events and AST) for modular data pipelines. - Added low-level parser (to events), presenter and visitor APIs. - Added the [YAML Test Suite](https://redirect.github.com/yaml/yaml-test-suite) to the test set. ##### Changed - See the [migration guide](docs/migrate_v4_to_v5.md) for upgrade notes. - Rewritten in TypeScript and reorganized the public API around flat named exports. - Reduced the set of exported schemas: - YAML 1.2 schemas: `CORE_SCHEMA` (loader default), `JSON_SCHEMA`, `FAILSAFE_SCHEMA`. - `YAML11_SCHEMA`, a combination of all YAML 1.1 tags (YAML 1.1 does not specify a schema, only "types"). - `load`/`dump` default behaviour is now specified exactly via schemas: - `load` uses `CORE_SCHEMA`, without `!!merge` by default. - `dump` uses `YAML11_SCHEMA` + `CORE_SCHEMA` for the quoting check, to guarantee backward compatibility by default. - `!!set` is now loaded as a JavaScript `Set`. - Replaced the `Type` API with a tags API. Similar, but more precise and simpler. See examples for details. Tags can be defined via `defineScalarTag()`, `defineSequenceTag()` and `defineMappingTag()`, or as a spread + override of an existing tag. - Renamed `Schema.extend()` to `Schema.withTags()`. - Expanded YAML 1.2 conformance and improved handling of directives, document markers, block keys, multiline scalars, tag syntax and other things. - `load()` now throws on empty input instead of returning `undefined`. - Moved browser builds to the `js-yaml/browser` export. - Deprecated the `loadAll` signature with an iterator (still works, but is a candidate for removal). ##### Removed - Removed deprecated `safeLoad()`, `safeLoadAll()` and `safeDump()` exports. - Removed `DEFAULT_SCHEMA` and the nested `types` export. - Removed loader options `onWarning`, `legacy` and `listener`. - Removed dumper options `styles`, `replacer`, `noCompatMode`, `condenseFlow`, `quotingType` and `forceQuotes`. Renamed `noArrayIndent` to `seqNoIndent`. Formatting and representation are now configured through presenter options, schemas and tag definitions. See migration guide on how to replace. - Removed support for importing internal files from `lib/`. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zLjIiLCJ1cGRhdGVkSW5WZXIiOiI0NC4zLjIiLCJ0YXJnZXRCcmFuY2giOiJjYW5hcnkiLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
188 lines
8.2 KiB
JSON
188 lines
8.2 KiB
JSON
{
|
|
"name": "@affine/monorepo",
|
|
"version": "0.27.0",
|
|
"private": true,
|
|
"author": "toeverything",
|
|
"license": "MIT",
|
|
"workspaces": [
|
|
".",
|
|
"blocksuite/**/*",
|
|
"packages/*/*",
|
|
"packages/frontend/apps/*",
|
|
"tools/*",
|
|
"docs/reference",
|
|
"tools/@types/*",
|
|
"tests/*"
|
|
],
|
|
"engines": {
|
|
"node": ">=22.12.0 <23.0.0"
|
|
},
|
|
"scripts": {
|
|
"affine": "r affine.ts",
|
|
"af": "r affine.ts",
|
|
"dev": "yarn affine dev",
|
|
"build": "yarn affine build",
|
|
"lint:eslint": "cross-env NODE_OPTIONS=\"--max-old-space-size=16384\" eslint --report-unused-disable-directives-severity=off . --cache",
|
|
"lint:eslint:fix": "yarn lint:eslint --fix --fix-type problem,suggestion,layout",
|
|
"lint:prettier": "prettier --ignore-unknown --cache --check .",
|
|
"lint:prettier:fix": "prettier --ignore-unknown --cache --write .",
|
|
"lint:ox": "oxlint --deny-warnings",
|
|
"lint:ox:fix": "yarn lint:ox --fix",
|
|
"lint": "yarn lint:ox && yarn lint:eslint && yarn lint:prettier",
|
|
"lint:fix": "yarn lint:ox:fix && yarn lint:eslint:fix && yarn lint:prettier:fix",
|
|
"test": "vitest --run",
|
|
"test:ui": "vitest --ui",
|
|
"test:coverage": "vitest run --coverage",
|
|
"typecheck": "tsc -b tsconfig.json --verbose",
|
|
"postinstall": "yarn affine init && yarn husky"
|
|
},
|
|
"lint-staged": {
|
|
"*": "prettier --write --ignore-unknown --cache",
|
|
"*.{ts,tsx,mjs,js,jsx}": [
|
|
"prettier --ignore-unknown --write",
|
|
"cross-env NODE_OPTIONS=\"--max-old-space-size=16384\" eslint --cache --fix"
|
|
],
|
|
"*.toml": [
|
|
"taplo format"
|
|
],
|
|
"*.rs": [
|
|
"cargo fmt --"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"@affine-tools/cli": "workspace:*",
|
|
"@capacitor/cli": "^8.4.2",
|
|
"@eslint/js": "^9.39.2",
|
|
"@faker-js/faker": "^10.1.0",
|
|
"@istanbuljs/schema": "^0.1.3",
|
|
"@magic-works/i18n-codegen": "^0.6.1",
|
|
"@playwright/test": "=1.58.2",
|
|
"@smarttools/eslint-plugin-rxjs": "^1.0.8",
|
|
"@taplo/cli": "^0.7.0",
|
|
"@toeverything/infra": "workspace:*",
|
|
"@types/eslint": "^9.6.1",
|
|
"@types/node": "^22.0.0",
|
|
"@typescript-eslint/parser": "^8.55.0",
|
|
"@vanilla-extract/vite-plugin": "^5.0.0",
|
|
"@vitest/browser": "^4.1.10",
|
|
"@vitest/coverage-istanbul": "^4.1.10",
|
|
"@vitest/ui": "^4.1.10",
|
|
"cross-env": "^10.1.0",
|
|
"electron": "^39.0.0",
|
|
"eslint": "^9.39.2",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
"eslint-plugin-import-x": "^4.16.1",
|
|
"eslint-plugin-lit": "^2.2.1",
|
|
"eslint-plugin-oxlint": "1.68.0",
|
|
"eslint-plugin-react": "^7.37.5",
|
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
"eslint-plugin-sonarjs": "^4.0.2",
|
|
"happy-dom": "^20.0.0",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^16.0.0",
|
|
"msw": "^2.13.2",
|
|
"oxlint": "1.68.0",
|
|
"oxlint-tsgolint": "^0.23.0",
|
|
"prettier": "^3.7.4",
|
|
"semver": "^7.7.3",
|
|
"typescript": "^5.9.3",
|
|
"typescript-eslint": "^8.55.0",
|
|
"unplugin-swc": "^1.5.9",
|
|
"vite": "^7.3.5",
|
|
"vitest": "^4.1.10"
|
|
},
|
|
"packageManager": "yarn@4.13.0",
|
|
"resolutions": {
|
|
"array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@^1",
|
|
"array-includes": "npm:@nolyfill/array-includes@^1",
|
|
"array.prototype.flat": "npm:@nolyfill/array.prototype.flat@^1",
|
|
"array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@^1",
|
|
"array.prototype.tosorted": "npm:@nolyfill/array.prototype.tosorted@^1",
|
|
"arraybuffer.prototype.slice": "npm:@nolyfill/arraybuffer.prototype.slice@^1",
|
|
"asynciterator.prototype": "npm:@nolyfill/asynciterator.prototype@^1",
|
|
"available-typed-arrays": "npm:@nolyfill/available-typed-arrays@^1",
|
|
"deep-equal": "npm:@nolyfill/deep-equal@^1",
|
|
"define-properties": "npm:@nolyfill/define-properties@^1",
|
|
"es-iterator-helpers": "npm:@nolyfill/es-iterator-helpers@^1",
|
|
"es-set-tostringtag": "npm:@nolyfill/es-set-tostringtag@^1",
|
|
"function-bind": "npm:@nolyfill/function-bind@^1",
|
|
"function.prototype.name": "npm:@nolyfill/function.prototype.name@^1",
|
|
"get-symbol-description": "npm:@nolyfill/get-symbol-description@^1",
|
|
"globalthis": "npm:@nolyfill/globalthis@^1",
|
|
"gopd": "npm:@nolyfill/gopd@^1",
|
|
"has": "npm:@nolyfill/has@^1",
|
|
"has-property-descriptors": "npm:@nolyfill/has-property-descriptors@^1",
|
|
"has-proto": "npm:@nolyfill/has-proto@^1",
|
|
"has-symbols": "npm:@nolyfill/has-symbols@^1",
|
|
"has-tostringtag": "npm:@nolyfill/has-tostringtag@^1",
|
|
"is-arguments": "npm:@nolyfill/is-arguments@^1",
|
|
"is-array-buffer": "npm:@nolyfill/is-array-buffer@^1",
|
|
"is-date-object": "npm:@nolyfill/is-date-object@^1",
|
|
"is-generator-function": "npm:@nolyfill/is-generator-function@^1",
|
|
"is-regex": "npm:@nolyfill/is-regex@^1",
|
|
"is-shared-array-buffer": "npm:@nolyfill/is-shared-array-buffer@^1",
|
|
"is-string": "npm:@nolyfill/is-string@^1",
|
|
"is-symbol": "npm:@nolyfill/is-symbol@^1",
|
|
"is-weakref": "npm:@nolyfill/is-weakref@^1",
|
|
"iterator.prototype": "npm:@nolyfill/iterator.prototype@^1",
|
|
"json-stable-stringify": "npm:@nolyfill/json-stable-stringify@^1",
|
|
"jsonify": "npm:@nolyfill/jsonify@^1",
|
|
"object-is": "npm:@nolyfill/object-is@^1",
|
|
"object-keys": "npm:@nolyfill/object-keys@^1",
|
|
"object.assign": "npm:@nolyfill/object.assign@^1",
|
|
"object.entries": "npm:@nolyfill/object.entries@^1",
|
|
"object.fromentries": "npm:@nolyfill/object.fromentries@^1",
|
|
"object.hasown": "npm:@nolyfill/object.hasown@^1",
|
|
"object.values": "npm:@nolyfill/object.values@^1",
|
|
"on-headers": "npm:on-headers@^1.1.0",
|
|
"reflect.getprototypeof": "npm:@nolyfill/reflect.getprototypeof@^1",
|
|
"regexp.prototype.flags": "npm:@nolyfill/regexp.prototype.flags@^1",
|
|
"safe-array-concat": "npm:@nolyfill/safe-array-concat@^1",
|
|
"safe-regex-test": "npm:@nolyfill/safe-regex-test@^1",
|
|
"side-channel": "npm:@nolyfill/side-channel@^1",
|
|
"string.prototype.matchall": "npm:@nolyfill/string.prototype.matchall@^1",
|
|
"string.prototype.trim": "npm:@nolyfill/string.prototype.trim@^1",
|
|
"string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@^1",
|
|
"string.prototype.trimstart": "npm:@nolyfill/string.prototype.trimstart@^1",
|
|
"typed-array-buffer": "npm:@nolyfill/typed-array-buffer@^1",
|
|
"typed-array-byte-length": "npm:@nolyfill/typed-array-byte-length@^1",
|
|
"typed-array-byte-offset": "npm:@nolyfill/typed-array-byte-offset@^1",
|
|
"typed-array-length": "npm:@nolyfill/typed-array-length@^1",
|
|
"unbox-primitive": "npm:@nolyfill/unbox-primitive@^1",
|
|
"which-boxed-primitive": "npm:@nolyfill/which-boxed-primitive@^1",
|
|
"which-typed-array": "npm:@nolyfill/which-typed-array@^1",
|
|
"array-flatten": "npm:@nolyfill/array-flatten@^1",
|
|
"array.prototype.findlast": "npm:@nolyfill/array.prototype.findlast@^1",
|
|
"hasown": "npm:@nolyfill/hasown@^1",
|
|
"internal-slot": "npm:@nolyfill/internal-slot@^1",
|
|
"is-core-module": "npm:@nolyfill/is-core-module@^1",
|
|
"is-typed-array": "npm:@nolyfill/is-typed-array@^1",
|
|
"isarray": "npm:@nolyfill/isarray@^1",
|
|
"safe-buffer": "npm:@nolyfill/safe-buffer@^1",
|
|
"safer-buffer": "npm:@nolyfill/safer-buffer@^1",
|
|
"set-function-length": "npm:@nolyfill/set-function-length@^1",
|
|
"string.prototype.repeat": "npm:@nolyfill/string.prototype.repeat@^1",
|
|
"typedarray": "npm:@nolyfill/typedarray@^1",
|
|
"macos-alias": "npm:@napi-rs/macos-alias@0.0.4",
|
|
"fs-xattr": "npm:@napi-rs/xattr@latest",
|
|
"@opentelemetry/core": "^2.10.0",
|
|
"ioredis": "^5.11.1",
|
|
"js-yaml@npm:^4.1.0": "^5.0.0",
|
|
"js-yaml@npm:4.1.1": "^5.0.0",
|
|
"multer": "^2.2.0",
|
|
"protobufjs": "^7.6.4",
|
|
"tar": "^7.5.21",
|
|
"tmp": "^0.2.7",
|
|
"ws@npm:^8.18.0": "^8.21.0",
|
|
"ws@npm:^8.18.3": "^8.21.0",
|
|
"ws@npm:^8.19.0": "^8.21.0",
|
|
"ws@npm:8.20.1": "^8.21.0",
|
|
"ws@npm:~8.17.1": "^8.21.0",
|
|
"decode-named-character-reference@npm:^1.0.0": "patch:decode-named-character-reference@npm%3A1.0.2#~/.yarn/patches/decode-named-character-reference-npm-1.0.2-db17a755fd.patch",
|
|
"@atlaskit/pragmatic-drag-and-drop": "patch:@atlaskit/pragmatic-drag-and-drop@npm%3A1.4.0#~/.yarn/patches/@atlaskit-pragmatic-drag-and-drop-npm-1.4.0-75c45f52d3.patch",
|
|
"yjs": "patch:yjs@npm%3A13.6.21#~/.yarn/patches/yjs-npm-13.6.21-c9f1f3397c.patch"
|
|
}
|
|
}
|