diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-05-14 14:05:49 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-05-14 14:05:49 +0800 |
| commit | 06823fbf1c2e763a5bf76c3990ca98fbbcd98691 (patch) | |
| tree | 4280bece3888d12a022093bf1a9cd1b049393602 /node_modules/yaml | |
| parent | 1368909b3cd552dbb0d12d5863c597f5be46177d (diff) | |
updated node_modules
Diffstat (limited to 'node_modules/yaml')
| -rw-r--r-- | node_modules/yaml/README.md | 28 | ||||
| -rw-r--r-- | node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js | 26 | ||||
| -rw-r--r-- | node_modules/yaml/browser/dist/parse/parser.js | 5 | ||||
| -rw-r--r-- | node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js | 2 | ||||
| -rw-r--r-- | node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js | 2 | ||||
| -rw-r--r-- | node_modules/yaml/browser/dist/stringify/foldFlowLines.js | 29 | ||||
| -rw-r--r-- | node_modules/yaml/browser/dist/stringify/stringifyCollection.js | 20 | ||||
| -rw-r--r-- | node_modules/yaml/dist/compose/resolve-flow-scalar.js | 26 | ||||
| -rw-r--r-- | node_modules/yaml/dist/nodes/Pair.d.ts | 2 | ||||
| -rw-r--r-- | node_modules/yaml/dist/parse/cst.d.ts | 2 | ||||
| -rw-r--r-- | node_modules/yaml/dist/parse/parser.js | 5 | ||||
| -rw-r--r-- | node_modules/yaml/dist/schema/yaml-1.1/binary.js | 2 | ||||
| -rw-r--r-- | node_modules/yaml/dist/schema/yaml-1.1/bool.js | 2 | ||||
| -rw-r--r-- | node_modules/yaml/dist/stringify/foldFlowLines.js | 29 | ||||
| -rw-r--r-- | node_modules/yaml/dist/stringify/stringifyCollection.js | 20 | ||||
| -rw-r--r-- | node_modules/yaml/package.json | 17 |
16 files changed, 118 insertions, 99 deletions
diff --git a/node_modules/yaml/README.md b/node_modules/yaml/README.md index 61e1a2ad..25c273d7 100644 --- a/node_modules/yaml/README.md +++ b/node_modules/yaml/README.md @@ -28,11 +28,19 @@ npm install yaml **Note:** These docs are for `yaml@2`. For v1, see the [v1.10.0 tag](https://github.com/eemeli/yaml/tree/v1.10.0) for the source and [eemeli.org/yaml/v1](https://eemeli.org/yaml/v1/) for the documentation. +The development and maintenance of this library is [sponsored](https://github.com/sponsors/eemeli) by: + +<a href="https://www.scipress.io/"> +<img width=150 src="https://eemeli.org/yaml/images/scipress.svg" alt="Scipress" /> +</a> + ## API Overview The API provided by `yaml` has three layers, depending on how deep you need to go: [Parse & Stringify](https://eemeli.org/yaml/#parse-amp-stringify), [Documents](https://eemeli.org/yaml/#documents), and the underlying [Lexer/Parser/Composer](https://eemeli.org/yaml/#parsing-yaml). The first has the simplest API and "just works", the second gets you all the bells and whistles supported by the library along with a decent [AST](https://eemeli.org/yaml/#content-nodes), and the third lets you get progressively closer to YAML source, if that's your thing. +A [command-line tool](https://eemeli.org/yaml/#command-line-tool) is also included. + ```js import { parse, stringify } from 'yaml' // or @@ -55,26 +63,26 @@ const YAML = require('yaml') - [`#directives`](https://eemeli.org/yaml/#stream-directives) - [`#errors`](https://eemeli.org/yaml/#errors) - [`#warnings`](https://eemeli.org/yaml/#errors) -- [`isDocument(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`isDocument(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) - [`parseAllDocuments(str, options?): Document[]`](https://eemeli.org/yaml/#parsing-documents) - [`parseDocument(str, options?): Document`](https://eemeli.org/yaml/#parsing-documents) ### Content Nodes -- [`isAlias(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) -- [`isCollection(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) -- [`isMap(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) -- [`isNode(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) -- [`isPair(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) -- [`isScalar(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) -- [`isSeq(foo): boolean`](https://eemeli.org/yaml/#identifying-nodes) +- [`isAlias(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isCollection(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isMap(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isNode(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isPair(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isScalar(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isSeq(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) - [`new Scalar(value)`](https://eemeli.org/yaml/#scalar-values) - [`new YAMLMap()`](https://eemeli.org/yaml/#collections) - [`new YAMLSeq()`](https://eemeli.org/yaml/#collections) - [`doc.createAlias(node, name?): Alias`](https://eemeli.org/yaml/#working-with-anchors) - [`doc.createNode(value, options?): Node`](https://eemeli.org/yaml/#creating-nodes) - [`doc.createPair(key, value): Pair`](https://eemeli.org/yaml/#creating-nodes) -- [`visit(node, visitor)`](https://eemeli.org/yaml/#modifying-nodes) +- [`visit(node, visitor)`](https://eemeli.org/yaml/#finding-and-modifying-nodes) ### Parsing YAML @@ -143,5 +151,5 @@ YAML.stringify({ number: 3, plain: 'string', block: 'two\nlines\n' }) Browser testing provided by: <a href="https://www.browserstack.com/open-source"> -<img width=200 src="https://eemeli.org/yaml/images/browserstack.svg" /> +<img width=200 src="https://eemeli.org/yaml/images/browserstack.svg" alt="BrowserStack" /> </a> diff --git a/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js b/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js index 501cf396..ebb9fd42 100644 --- a/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +++ b/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js @@ -189,19 +189,19 @@ function foldNewline(source, offset) { return { fold, offset }; } const escapeCodes = { - '0': '\0', - a: '\x07', - b: '\b', - e: '\x1b', - f: '\f', - n: '\n', - r: '\r', - t: '\t', - v: '\v', - N: '\u0085', - _: '\u00a0', - L: '\u2028', - P: '\u2029', + '0': '\0', // null character + a: '\x07', // bell character + b: '\b', // backspace + e: '\x1b', // escape character + f: '\f', // form feed + n: '\n', // line feed + r: '\r', // carriage return + t: '\t', // horizontal tab + v: '\v', // vertical tab + N: '\u0085', // Unicode next line + _: '\u00a0', // Unicode non-breaking space + L: '\u2028', // Unicode line separator + P: '\u2029', // Unicode paragraph separator ' ': ' ', '"': '"', '/': '/', diff --git a/node_modules/yaml/browser/dist/parse/parser.js b/node_modules/yaml/browser/dist/parse/parser.js index d75e1ee4..65da03d6 100644 --- a/node_modules/yaml/browser/dist/parse/parser.js +++ b/node_modules/yaml/browser/dist/parse/parser.js @@ -513,7 +513,10 @@ class Parser { return; } if (this.indent >= map.indent) { - const atNextItem = !this.onKeyLine && this.indent === map.indent && it.sep; + const atNextItem = !this.onKeyLine && + this.indent === map.indent && + it.sep && + this.type !== 'seq-item-ind'; // For empty nodes, assign newline-separated not indented empty tokens to following node let start = []; if (atNextItem && it.sep && !it.value) { diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js index a7008193..8021a527 100644 --- a/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js @@ -2,7 +2,7 @@ import { Scalar } from '../../nodes/Scalar.js'; import { stringifyString } from '../../stringify/stringifyString.js'; const binary = { - identify: value => value instanceof Uint8Array, + identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array default: false, tag: 'tag:yaml.org,2002:binary', /** diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js index 1ced7919..999b59d4 100644 --- a/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js @@ -18,7 +18,7 @@ const falseTag = { identify: value => value === false, default: true, tag: 'tag:yaml.org,2002:bool', - test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, resolve: () => new Scalar(false), stringify: boolStringify }; diff --git a/node_modules/yaml/browser/dist/stringify/foldFlowLines.js b/node_modules/yaml/browser/dist/stringify/foldFlowLines.js index 01fe7876..2a554266 100644 --- a/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +++ b/node_modules/yaml/browser/dist/stringify/foldFlowLines.js @@ -28,7 +28,7 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = let escStart = -1; let escEnd = -1; if (mode === FOLD_BLOCK) { - i = consumeMoreIndentedLines(text, i); + i = consumeMoreIndentedLines(text, i, indent.length); if (i !== -1) end = i + endStep; } @@ -52,8 +52,8 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = } if (ch === '\n') { if (mode === FOLD_BLOCK) - i = consumeMoreIndentedLines(text, i); - end = i + endStep; + i = consumeMoreIndentedLines(text, i, indent.length); + end = i + indent.length + endStep; split = undefined; } else { @@ -121,15 +121,24 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = * Presumes `i + 1` is at the start of a line * @returns index of last newline in more-indented block */ -function consumeMoreIndentedLines(text, i) { - let ch = text[i + 1]; +function consumeMoreIndentedLines(text, i, indent) { + let end = i; + let start = i + 1; + let ch = text[start]; while (ch === ' ' || ch === '\t') { - do { - ch = text[(i += 1)]; - } while (ch && ch !== '\n'); - ch = text[i + 1]; + if (i < start + indent) { + ch = text[++i]; + } + else { + do { + ch = text[++i]; + } while (ch && ch !== '\n'); + end = i; + start = i + 1; + ch = text[start]; + } } - return i; + return end; } export { FOLD_BLOCK, FOLD_FLOW, FOLD_QUOTED, foldFlowLines }; diff --git a/node_modules/yaml/browser/dist/stringify/stringifyCollection.js b/node_modules/yaml/browser/dist/stringify/stringifyCollection.js index 4817a9d5..9019400f 100644 --- a/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +++ b/node_modules/yaml/browser/dist/stringify/stringifyCollection.js @@ -1,4 +1,3 @@ -import { Collection } from '../nodes/Collection.js'; import { isNode, isPair } from '../nodes/identity.js'; import { stringify } from './stringify.js'; import { lineComment, indentComment } from './stringifyComment.js'; @@ -59,7 +58,7 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl onChompKeep(); return str; } -function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemIndent, onComment }) { +function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; itemIndent += indentStep; const itemCtx = Object.assign({}, ctx, { @@ -112,32 +111,25 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden lines.push(str); linesAtValue = lines.length; } - let str; const { start, end } = flowChars; if (lines.length === 0) { - str = start + end; + return start + end; } else { if (!reqNewline) { const len = lines.reduce((sum, line) => sum + line.length + 2, 2); - reqNewline = len > Collection.maxFlowStringSingleLineLength; + reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; } if (reqNewline) { - str = start; + let str = start; for (const line of lines) str += line ? `\n${indentStep}${indent}${line}` : '\n'; - str += `\n${indent}${end}`; + return `${str}\n${indent}${end}`; } else { - str = `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; + return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; } } - if (comment) { - str += lineComment(str, indent, commentString(comment)); - if (onComment) - onComment(); - } - return str; } function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { if (comment && chompKeep) diff --git a/node_modules/yaml/dist/compose/resolve-flow-scalar.js b/node_modules/yaml/dist/compose/resolve-flow-scalar.js index cf6257ce..7976f2fd 100644 --- a/node_modules/yaml/dist/compose/resolve-flow-scalar.js +++ b/node_modules/yaml/dist/compose/resolve-flow-scalar.js @@ -191,19 +191,19 @@ function foldNewline(source, offset) { return { fold, offset }; } const escapeCodes = { - '0': '\0', - a: '\x07', - b: '\b', - e: '\x1b', - f: '\f', - n: '\n', - r: '\r', - t: '\t', - v: '\v', - N: '\u0085', - _: '\u00a0', - L: '\u2028', - P: '\u2029', + '0': '\0', // null character + a: '\x07', // bell character + b: '\b', // backspace + e: '\x1b', // escape character + f: '\f', // form feed + n: '\n', // line feed + r: '\r', // carriage return + t: '\t', // horizontal tab + v: '\v', // vertical tab + N: '\u0085', // Unicode next line + _: '\u00a0', // Unicode non-breaking space + L: '\u2028', // Unicode line separator + P: '\u2029', // Unicode paragraph separator ' ': ' ', '"': '"', '/': '/', diff --git a/node_modules/yaml/dist/nodes/Pair.d.ts b/node_modules/yaml/dist/nodes/Pair.d.ts index e87fe66f..6178d3a3 100644 --- a/node_modules/yaml/dist/nodes/Pair.d.ts +++ b/node_modules/yaml/dist/nodes/Pair.d.ts @@ -5,7 +5,7 @@ import type { StringifyContext } from '../stringify/stringify.js'; import { addPairToJSMap } from './addPairToJSMap.js'; import { NODE_TYPE } from './identity.js'; import type { ToJSContext } from './toJS.js'; -export declare function createPair(key: unknown, value: unknown, ctx: CreateNodeContext): Pair<import("./Node.js").Node, import("./YAMLMap.js").YAMLMap<unknown, unknown> | import("./Scalar.js").Scalar<unknown> | import("./Alias.js").Alias | import("./YAMLSeq.js").YAMLSeq<unknown>>; +export declare function createPair(key: unknown, value: unknown, ctx: CreateNodeContext): Pair<import("./Node.js").Node, import("./Alias.js").Alias | import("./Scalar.js").Scalar<unknown> | import("./YAMLMap.js").YAMLMap<unknown, unknown> | import("./YAMLSeq.js").YAMLSeq<unknown>>; export declare class Pair<K = unknown, V = unknown> { readonly [NODE_TYPE]: symbol; /** Always Node or null when parsed, but can be set to anything. */ diff --git a/node_modules/yaml/dist/parse/cst.d.ts b/node_modules/yaml/dist/parse/cst.d.ts index bfe7fc14..ec57ace1 100644 --- a/node_modules/yaml/dist/parse/cst.d.ts +++ b/node_modules/yaml/dist/parse/cst.d.ts @@ -99,7 +99,7 @@ export declare const SCALAR = "\u001F"; /** @returns `true` if `token` is a flow or block collection */ export declare const isCollection: (token: Token | null | undefined) => token is BlockMap | BlockSequence | FlowCollection; /** @returns `true` if `token` is a flow or block scalar; not an alias */ -export declare const isScalar: (token: Token | null | undefined) => token is BlockScalar | FlowScalar; +export declare const isScalar: (token: Token | null | undefined) => token is FlowScalar | BlockScalar; /** Get a printable representation of a lexer token */ export declare function prettyToken(token: string): string; /** Identify the type of a lexer token. May return `null` for unknown tokens. */ diff --git a/node_modules/yaml/dist/parse/parser.js b/node_modules/yaml/dist/parse/parser.js index 8dcdf5dc..7a1493d8 100644 --- a/node_modules/yaml/dist/parse/parser.js +++ b/node_modules/yaml/dist/parse/parser.js @@ -517,7 +517,10 @@ class Parser { return; } if (this.indent >= map.indent) { - const atNextItem = !this.onKeyLine && this.indent === map.indent && it.sep; + const atNextItem = !this.onKeyLine && + this.indent === map.indent && + it.sep && + this.type !== 'seq-item-ind'; // For empty nodes, assign newline-separated not indented empty tokens to following node let start = []; if (atNextItem && it.sep && !it.value) { diff --git a/node_modules/yaml/dist/schema/yaml-1.1/binary.js b/node_modules/yaml/dist/schema/yaml-1.1/binary.js index df93e05b..38fa4980 100644 --- a/node_modules/yaml/dist/schema/yaml-1.1/binary.js +++ b/node_modules/yaml/dist/schema/yaml-1.1/binary.js @@ -4,7 +4,7 @@ var Scalar = require('../../nodes/Scalar.js'); var stringifyString = require('../../stringify/stringifyString.js'); const binary = { - identify: value => value instanceof Uint8Array, + identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array default: false, tag: 'tag:yaml.org,2002:binary', /** diff --git a/node_modules/yaml/dist/schema/yaml-1.1/bool.js b/node_modules/yaml/dist/schema/yaml-1.1/bool.js index fdb3b460..d9879526 100644 --- a/node_modules/yaml/dist/schema/yaml-1.1/bool.js +++ b/node_modules/yaml/dist/schema/yaml-1.1/bool.js @@ -20,7 +20,7 @@ const falseTag = { identify: value => value === false, default: true, tag: 'tag:yaml.org,2002:bool', - test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, resolve: () => new Scalar.Scalar(false), stringify: boolStringify }; diff --git a/node_modules/yaml/dist/stringify/foldFlowLines.js b/node_modules/yaml/dist/stringify/foldFlowLines.js index efe7a257..829a5601 100644 --- a/node_modules/yaml/dist/stringify/foldFlowLines.js +++ b/node_modules/yaml/dist/stringify/foldFlowLines.js @@ -30,7 +30,7 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = let escStart = -1; let escEnd = -1; if (mode === FOLD_BLOCK) { - i = consumeMoreIndentedLines(text, i); + i = consumeMoreIndentedLines(text, i, indent.length); if (i !== -1) end = i + endStep; } @@ -54,8 +54,8 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = } if (ch === '\n') { if (mode === FOLD_BLOCK) - i = consumeMoreIndentedLines(text, i); - end = i + endStep; + i = consumeMoreIndentedLines(text, i, indent.length); + end = i + indent.length + endStep; split = undefined; } else { @@ -123,15 +123,24 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = * Presumes `i + 1` is at the start of a line * @returns index of last newline in more-indented block */ -function consumeMoreIndentedLines(text, i) { - let ch = text[i + 1]; +function consumeMoreIndentedLines(text, i, indent) { + let end = i; + let start = i + 1; + let ch = text[start]; while (ch === ' ' || ch === '\t') { - do { - ch = text[(i += 1)]; - } while (ch && ch !== '\n'); - ch = text[i + 1]; + if (i < start + indent) { + ch = text[++i]; + } + else { + do { + ch = text[++i]; + } while (ch && ch !== '\n'); + end = i; + start = i + 1; + ch = text[start]; + } } - return i; + return end; } exports.FOLD_BLOCK = FOLD_BLOCK; diff --git a/node_modules/yaml/dist/stringify/stringifyCollection.js b/node_modules/yaml/dist/stringify/stringifyCollection.js index 750efc15..6efffc51 100644 --- a/node_modules/yaml/dist/stringify/stringifyCollection.js +++ b/node_modules/yaml/dist/stringify/stringifyCollection.js @@ -1,6 +1,5 @@ 'use strict'; -var Collection = require('../nodes/Collection.js'); var identity = require('../nodes/identity.js'); var stringify = require('./stringify.js'); var stringifyComment = require('./stringifyComment.js'); @@ -61,7 +60,7 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl onChompKeep(); return str; } -function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemIndent, onComment }) { +function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; itemIndent += indentStep; const itemCtx = Object.assign({}, ctx, { @@ -114,32 +113,25 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden lines.push(str); linesAtValue = lines.length; } - let str; const { start, end } = flowChars; if (lines.length === 0) { - str = start + end; + return start + end; } else { if (!reqNewline) { const len = lines.reduce((sum, line) => sum + line.length + 2, 2); - reqNewline = len > Collection.Collection.maxFlowStringSingleLineLength; + reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; } if (reqNewline) { - str = start; + let str = start; for (const line of lines) str += line ? `\n${indentStep}${indent}${line}` : '\n'; - str += `\n${indent}${end}`; + return `${str}\n${indent}${end}`; } else { - str = `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; + return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; } } - if (comment) { - str += stringifyComment.lineComment(str, indent, commentString(comment)); - if (onComment) - onComment(); - } - return str; } function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { if (comment && chompKeep) diff --git a/node_modules/yaml/package.json b/node_modules/yaml/package.json index 3f904102..c20db638 100644 --- a/node_modules/yaml/package.json +++ b/node_modules/yaml/package.json @@ -1,6 +1,6 @@ { "name": "yaml", - "version": "2.3.4", + "version": "2.4.2", "license": "ISC", "author": "Eemeli Aro <eemeli@gmail.com>", "repository": "github:eemeli/yaml", @@ -18,6 +18,7 @@ ], "type": "commonjs", "main": "./dist/index.js", + "bin": "./bin.mjs", "browser": { "./dist/index.js": "./browser/index.js", "./dist/util.js": "./browser/dist/util.js", @@ -52,7 +53,9 @@ "test:dist:types": "tsc --allowJs --moduleResolution node --noEmit --target es5 dist/index.js", "test:types": "tsc --noEmit && tsc --noEmit -p tests/tsconfig.json", "docs:install": "cd docs-slate && bundle install", + "predocs:deploy": "node docs/prepare-docs.mjs", "docs:deploy": "cd docs-slate && ./deploy.sh", + "predocs": "node docs/prepare-docs.mjs", "docs": "cd docs-slate && bundle exec middleman server", "preversion": "npm test && npm run build", "prepublishOnly": "npm run clean && npm test && npm run build" @@ -66,17 +69,17 @@ }, "devDependencies": { "@babel/core": "^7.12.10", - "@babel/plugin-proposal-class-properties": "^7.12.1", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-transform-class-properties": "^7.23.3", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4", "@babel/plugin-transform-typescript": "^7.12.17", "@babel/preset-env": "^7.12.11", "@rollup/plugin-babel": "^6.0.3", "@rollup/plugin-replace": "^5.0.2", "@rollup/plugin-typescript": "^11.0.0", "@types/jest": "^29.2.4", - "@types/node": "^14.18.35", - "@typescript-eslint/eslint-plugin": "^6.4.1", - "@typescript-eslint/parser": "^6.4.1", + "@types/node": "^20.11.20", + "@typescript-eslint/eslint-plugin": "^7.0.2", + "@typescript-eslint/parser": "^7.0.2", "babel-jest": "^29.0.1", "cross-env": "^7.0.3", "eslint": "^8.2.0", @@ -85,7 +88,7 @@ "jest": "^29.0.1", "jest-ts-webcompat-resolver": "^1.0.0", "prettier": "^3.0.2", - "rollup": "^3.7.5", + "rollup": "^4.12.0", "tslib": "^2.1.0", "typescript": "^5.0.3" }, |
