From f7a383d82b85856e92e80ff75f6a40f572ec2210 Mon Sep 17 00:00:00 2001 From: Brian Terlson Date: Tue, 11 Jun 2024 08:55:15 -0700 Subject: [PATCH 1/4] Add oneOf to JSON Schema --- .../generated-defs/TypeSpec.JsonSchema.ts | 6 ++++++ .../TypeSpec.JsonSchema.ts-test.ts | 4 ++++ packages/json-schema/lib/main.tsp | 5 +++++ packages/json-schema/src/index.ts | 10 ++++++++++ .../json-schema/src/json-schema-emitter.ts | 14 +++++++++++-- packages/json-schema/test/unions.test.ts | 20 +++++++++++++++++++ 6 files changed, 57 insertions(+), 2 deletions(-) diff --git a/packages/json-schema/generated-defs/TypeSpec.JsonSchema.ts b/packages/json-schema/generated-defs/TypeSpec.JsonSchema.ts index b65738bc4a..e33657fcc0 100644 --- a/packages/json-schema/generated-defs/TypeSpec.JsonSchema.ts +++ b/packages/json-schema/generated-defs/TypeSpec.JsonSchema.ts @@ -5,6 +5,7 @@ import type { Numeric, Scalar, Type, + Union, } from "@typespec/compiler"; /** @@ -43,6 +44,11 @@ export type BaseUriDecorator = ( */ export type IdDecorator = (context: DecoratorContext, target: Type, id: string) => void; +/** + * Specify that `oneOf` should be used instead of `anyOf` for that union. + */ +export type OneOfDecorator = (context: DecoratorContext, target: Union | ModelProperty) => void; + /** * Specify that the numeric type must be a multiple of some numeric value. * diff --git a/packages/json-schema/generated-defs/TypeSpec.JsonSchema.ts-test.ts b/packages/json-schema/generated-defs/TypeSpec.JsonSchema.ts-test.ts index 8e2778f71f..80ecdef7f8 100644 --- a/packages/json-schema/generated-defs/TypeSpec.JsonSchema.ts-test.ts +++ b/packages/json-schema/generated-defs/TypeSpec.JsonSchema.ts-test.ts @@ -13,6 +13,7 @@ import { $minContains, $minProperties, $multipleOf, + $oneOf, $prefixItems, $uniqueItems, } from "@typespec/json-schema"; @@ -30,6 +31,7 @@ import type { MinContainsDecorator, MinPropertiesDecorator, MultipleOfDecorator, + OneOfDecorator, PrefixItemsDecorator, UniqueItemsDecorator, } from "./TypeSpec.JsonSchema.js"; @@ -38,6 +40,7 @@ type Decorators = { $jsonSchema: JsonSchemaDecorator; $baseUri: BaseUriDecorator; $id: IdDecorator; + $oneOf: OneOfDecorator; $multipleOf: MultipleOfDecorator; $contains: ContainsDecorator; $minContains: MinContainsDecorator; @@ -57,6 +60,7 @@ const _: Decorators = { $jsonSchema, $baseUri, $id, + $oneOf, $multipleOf, $contains, $minContains, diff --git a/packages/json-schema/lib/main.tsp b/packages/json-schema/lib/main.tsp index fae17c91d9..3aa30c31f0 100644 --- a/packages/json-schema/lib/main.tsp +++ b/packages/json-schema/lib/main.tsp @@ -30,6 +30,11 @@ extern dec baseUri(target: Reflection.Namespace, baseUri: valueof string); */ extern dec id(target: unknown, id: valueof string); +/** + * Specify that `oneOf` should be used instead of `anyOf` for that union. + */ +extern dec oneOf(target: Reflection.Union | Reflection.ModelProperty); + /** * Specify that the numeric type must be a multiple of some numeric value. * diff --git a/packages/json-schema/src/index.ts b/packages/json-schema/src/index.ts index de5c4bdced..27a23b8def 100644 --- a/packages/json-schema/src/index.ts +++ b/packages/json-schema/src/index.ts @@ -29,6 +29,7 @@ import { MinContainsDecorator, MinPropertiesDecorator, MultipleOfDecorator, + OneOfDecorator, PrefixItemsDecorator, UniqueItemsDecorator, } from "../generated-defs/TypeSpec.JsonSchema.js"; @@ -145,6 +146,15 @@ export function getId(program: Program, target: Type) { return program.stateMap(idKey).get(target); } +const oneOfKey = createStateSymbol("JsonSchema.oneOf"); +export const $oneOf: OneOfDecorator = (context: DecoratorContext, target: Type) => { + context.program.stateMap(oneOfKey).set(target, true); +}; + +export function isOneOf(program: Program, target: Type) { + return program.stateMap(oneOfKey).has(target); +} + const containsKey = createStateSymbol("JsonSchema.contains"); export const $contains: ContainsDecorator = ( context: DecoratorContext, diff --git a/packages/json-schema/src/json-schema-emitter.ts b/packages/json-schema/src/json-schema-emitter.ts index 36da5fc205..ee99b954df 100644 --- a/packages/json-schema/src/json-schema-emitter.ts +++ b/packages/json-schema/src/json-schema-emitter.ts @@ -71,6 +71,7 @@ import { getPrefixItems, getUniqueItems, isJsonSchemaDeclaration, + isOneOf, } from "./index.js"; import { JSONSchemaEmitterOptions, reportDiagnostic } from "./lib.js"; export class JsonSchemaEmitter extends TypeEmitter, JSONSchemaEmitterOptions> { @@ -174,6 +175,11 @@ export class JsonSchemaEmitter extends TypeEmitter, JSONSche result.default = this.#getDefaultValue(property.type, property.default); } + if (result.anyOf && isOneOf(this.emitter.getProgram(), property)) { + result.oneOf = result.anyOf; + delete result.anyOf; + } + this.#applyConstraints(property, result); return result; @@ -296,8 +302,10 @@ export class JsonSchemaEmitter extends TypeEmitter, JSONSche } unionDeclaration(union: Union, name: string): EmitterOutput { + const key = isOneOf(this.emitter.getProgram(), union) ? "oneOf" : "anyOf"; + const withConstraints = this.#initializeSchema(union, name, { - anyOf: this.emitter.emitUnionVariants(union), + [key]: this.emitter.emitUnionVariants(union), }); this.#applyConstraints(union, withConstraints); @@ -305,8 +313,10 @@ export class JsonSchemaEmitter extends TypeEmitter, JSONSche } unionLiteral(union: Union): EmitterOutput { + const key = isOneOf(this.emitter.getProgram(), union) ? "oneOf" : "anyOf"; + return new ObjectBuilder({ - anyOf: this.emitter.emitUnionVariants(union), + [key]: this.emitter.emitUnionVariants(union), }); } diff --git a/packages/json-schema/test/unions.test.ts b/packages/json-schema/test/unions.test.ts index 34256aca1b..e022be0ecd 100644 --- a/packages/json-schema/test/unions.test.ts +++ b/packages/json-schema/test/unions.test.ts @@ -88,6 +88,26 @@ describe("emitting unions", () => { assert.strictEqual(Foo["x-foo"], true); }); + it("handles oneOf decorator", async () => { + const schemas = await emitSchema(` + @oneOf + union Foo { + "a", + "b" + } + + model Bar { + @oneOf + prop: "a" | "b" + } + `); + + const Foo = schemas["Foo.json"]; + const Bar = schemas["Bar.json"]; + + assert.ok(Foo.oneOf, "Foo uses oneOf"); + assert.ok(Bar.properties.prop.oneOf, "Bar.prop uses oneOf"); + }); it("handles decorators on variants", async () => { const schemas = await emitSchema(` union Foo { From 92a3de9ae36b6a108e0f6f7d5bf557369e6e2c93 Mon Sep 17 00:00:00 2001 From: Brian Terlson Date: Tue, 11 Jun 2024 08:56:18 -0700 Subject: [PATCH 2/4] changes --- .chronus/changes/json-schema-oneof-2024-5-11-8-56-5.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .chronus/changes/json-schema-oneof-2024-5-11-8-56-5.md diff --git a/.chronus/changes/json-schema-oneof-2024-5-11-8-56-5.md b/.chronus/changes/json-schema-oneof-2024-5-11-8-56-5.md new file mode 100644 index 0000000000..ef96db35ae --- /dev/null +++ b/.chronus/changes/json-schema-oneof-2024-5-11-8-56-5.md @@ -0,0 +1,7 @@ +--- +changeKind: feature +packages: + - "@typespec/json-schema" +--- + +Add support for @oneOf decorator. \ No newline at end of file From 635c42488cc69f5a8fdd3563c877b3ab6d20c4d6 Mon Sep 17 00:00:00 2001 From: Brian Terlson Date: Tue, 11 Jun 2024 09:42:55 -0700 Subject: [PATCH 3/4] add docs updates --- .../json-schema/reference/decorators.md | 16 ++ docs/emitters/json-schema/reference/index.mdx | 1 + packages/json-schema/README.md | 17 ++ .../typespec-vscode/ThirdPartyNotices.txt | 158 +++++++++++++++++- 4 files changed, 188 insertions(+), 4 deletions(-) diff --git a/docs/emitters/json-schema/reference/decorators.md b/docs/emitters/json-schema/reference/decorators.md index a61dd90562..e8445e5ad4 100644 --- a/docs/emitters/json-schema/reference/decorators.md +++ b/docs/emitters/json-schema/reference/decorators.md @@ -258,6 +258,22 @@ Specify that the numeric type must be a multiple of some numeric value. | ----- | ----------------- | -------------------------------------------------- | | value | `valueof numeric` | The numeric type must be a multiple of this value. | +### `@oneOf` {#@TypeSpec.JsonSchema.oneOf} + +Specify that `oneOf` should be used instead of `anyOf` for that union. + +```typespec +@TypeSpec.JsonSchema.oneOf +``` + +#### Target + +`Union | ModelProperty` + +#### Parameters + +None + ### `@prefixItems` {#@TypeSpec.JsonSchema.prefixItems} Specify that the target array must begin with the provided types. diff --git a/docs/emitters/json-schema/reference/index.mdx b/docs/emitters/json-schema/reference/index.mdx index bbc10f06d4..ce0f343fb0 100644 --- a/docs/emitters/json-schema/reference/index.mdx +++ b/docs/emitters/json-schema/reference/index.mdx @@ -52,6 +52,7 @@ npm install --save-peer @typespec/json-schema - [`@minContains`](./decorators.md#@TypeSpec.JsonSchema.minContains) - [`@minProperties`](./decorators.md#@TypeSpec.JsonSchema.minProperties) - [`@multipleOf`](./decorators.md#@TypeSpec.JsonSchema.multipleOf) +- [`@oneOf`](./decorators.md#@TypeSpec.JsonSchema.oneOf) - [`@prefixItems`](./decorators.md#@TypeSpec.JsonSchema.prefixItems) - [`@uniqueItems`](./decorators.md#@TypeSpec.JsonSchema.uniqueItems) diff --git a/packages/json-schema/README.md b/packages/json-schema/README.md index 9abdc9d89e..17a93bfaaa 100644 --- a/packages/json-schema/README.md +++ b/packages/json-schema/README.md @@ -95,6 +95,7 @@ When true, emit all references as json schema files, even if the referenced type - [`@minContains`](#@mincontains) - [`@minProperties`](#@minproperties) - [`@multipleOf`](#@multipleof) +- [`@oneOf`](#@oneof) - [`@prefixItems`](#@prefixitems) - [`@uniqueItems`](#@uniqueitems) @@ -348,6 +349,22 @@ Specify that the numeric type must be a multiple of some numeric value. | ----- | ----------------- | -------------------------------------------------- | | value | `valueof numeric` | The numeric type must be a multiple of this value. | +#### `@oneOf` + +Specify that `oneOf` should be used instead of `anyOf` for that union. + +```typespec +@TypeSpec.JsonSchema.oneOf +``` + +##### Target + +`Union | ModelProperty` + +##### Parameters + +None + #### `@prefixItems` Specify that the target array must begin with the provided types. diff --git a/packages/typespec-vscode/ThirdPartyNotices.txt b/packages/typespec-vscode/ThirdPartyNotices.txt index 110121fe58..86e805b490 100644 --- a/packages/typespec-vscode/ThirdPartyNotices.txt +++ b/packages/typespec-vscode/ThirdPartyNotices.txt @@ -9,9 +9,15 @@ components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise. 1. balanced-match version 1.0.2 (https://github.com/juliangruber/balanced-match) -2. brace-expansion version 2.0.1 (https://github.com/juliangruber/brace-expansion) -3. minimatch version 5.1.6 (https://github.com/isaacs/minimatch) -4. semver version 7.6.2 (https://github.com/npm/node-semver) +2. balanced-match version 1.0.2 (https://github.com/juliangruber/balanced-match) +3. brace-expansion version 2.0.1 (https://github.com/juliangruber/brace-expansion) +4. brace-expansion version 2.0.1 (https://github.com/juliangruber/brace-expansion) +5. lru-cache version 6.0.0 (https://github.com/isaacs/node-lru-cache) +6. minimatch version 5.1.6 (https://github.com/isaacs/minimatch) +7. minimatch version 5.1.6 (https://github.com/isaacs/minimatch) +8. semver version 7.6.2 (https://github.com/npm/node-semver) +9. semver version 7.5.4 (https://github.com/npm/node-semver) +10. yallist version 4.0.0 (https://github.com/isaacs/yallist) %% balanced-match NOTICES AND INFORMATION BEGIN HERE @@ -42,6 +48,62 @@ SOFTWARE. END OF balanced-match NOTICES AND INFORMATION +%% balanced-match NOTICES AND INFORMATION BEGIN HERE +===================================================== +(MIT) + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +====================================================="); +END OF balanced-match NOTICES AND INFORMATION + + +%% brace-expansion NOTICES AND INFORMATION BEGIN HERE +===================================================== +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +====================================================="); +END OF brace-expansion NOTICES AND INFORMATION + + %% brace-expansion NOTICES AND INFORMATION BEGIN HERE ===================================================== MIT License @@ -70,6 +132,50 @@ SOFTWARE. END OF brace-expansion NOTICES AND INFORMATION +%% lru-cache NOTICES AND INFORMATION BEGIN HERE +===================================================== +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +====================================================="); +END OF lru-cache NOTICES AND INFORMATION + + +%% minimatch NOTICES AND INFORMATION BEGIN HERE +===================================================== +The ISC License + +Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +====================================================="); +END OF minimatch NOTICES AND INFORMATION + + %% minimatch NOTICES AND INFORMATION BEGIN HERE ===================================================== The ISC License @@ -111,4 +217,48 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ====================================================="); -END OF semver NOTICES AND INFORMATION \ No newline at end of file +END OF semver NOTICES AND INFORMATION + + +%% semver NOTICES AND INFORMATION BEGIN HERE +===================================================== +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +====================================================="); +END OF semver NOTICES AND INFORMATION + + +%% yallist NOTICES AND INFORMATION BEGIN HERE +===================================================== +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +====================================================="); +END OF yallist NOTICES AND INFORMATION \ No newline at end of file From 2eeac88ef44ac441825b224f2cad886459a35c7f Mon Sep 17 00:00:00 2001 From: Brian Terlson Date: Tue, 11 Jun 2024 09:47:13 -0700 Subject: [PATCH 4/4] remove mistaken update --- .../typespec-vscode/ThirdPartyNotices.txt | 158 +----------------- 1 file changed, 4 insertions(+), 154 deletions(-) diff --git a/packages/typespec-vscode/ThirdPartyNotices.txt b/packages/typespec-vscode/ThirdPartyNotices.txt index 86e805b490..110121fe58 100644 --- a/packages/typespec-vscode/ThirdPartyNotices.txt +++ b/packages/typespec-vscode/ThirdPartyNotices.txt @@ -9,15 +9,9 @@ components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise. 1. balanced-match version 1.0.2 (https://github.com/juliangruber/balanced-match) -2. balanced-match version 1.0.2 (https://github.com/juliangruber/balanced-match) -3. brace-expansion version 2.0.1 (https://github.com/juliangruber/brace-expansion) -4. brace-expansion version 2.0.1 (https://github.com/juliangruber/brace-expansion) -5. lru-cache version 6.0.0 (https://github.com/isaacs/node-lru-cache) -6. minimatch version 5.1.6 (https://github.com/isaacs/minimatch) -7. minimatch version 5.1.6 (https://github.com/isaacs/minimatch) -8. semver version 7.6.2 (https://github.com/npm/node-semver) -9. semver version 7.5.4 (https://github.com/npm/node-semver) -10. yallist version 4.0.0 (https://github.com/isaacs/yallist) +2. brace-expansion version 2.0.1 (https://github.com/juliangruber/brace-expansion) +3. minimatch version 5.1.6 (https://github.com/isaacs/minimatch) +4. semver version 7.6.2 (https://github.com/npm/node-semver) %% balanced-match NOTICES AND INFORMATION BEGIN HERE @@ -48,62 +42,6 @@ SOFTWARE. END OF balanced-match NOTICES AND INFORMATION -%% balanced-match NOTICES AND INFORMATION BEGIN HERE -===================================================== -(MIT) - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -====================================================="); -END OF balanced-match NOTICES AND INFORMATION - - -%% brace-expansion NOTICES AND INFORMATION BEGIN HERE -===================================================== -MIT License - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -====================================================="); -END OF brace-expansion NOTICES AND INFORMATION - - %% brace-expansion NOTICES AND INFORMATION BEGIN HERE ===================================================== MIT License @@ -132,50 +70,6 @@ SOFTWARE. END OF brace-expansion NOTICES AND INFORMATION -%% lru-cache NOTICES AND INFORMATION BEGIN HERE -===================================================== -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -====================================================="); -END OF lru-cache NOTICES AND INFORMATION - - -%% minimatch NOTICES AND INFORMATION BEGIN HERE -===================================================== -The ISC License - -Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -====================================================="); -END OF minimatch NOTICES AND INFORMATION - - %% minimatch NOTICES AND INFORMATION BEGIN HERE ===================================================== The ISC License @@ -217,48 +111,4 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ====================================================="); -END OF semver NOTICES AND INFORMATION - - -%% semver NOTICES AND INFORMATION BEGIN HERE -===================================================== -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -====================================================="); -END OF semver NOTICES AND INFORMATION - - -%% yallist NOTICES AND INFORMATION BEGIN HERE -===================================================== -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -====================================================="); -END OF yallist NOTICES AND INFORMATION \ No newline at end of file +END OF semver NOTICES AND INFORMATION \ No newline at end of file