Bring in latest changes

This commit is contained in:
Christopher Schleiden
2023-01-09 14:03:56 -08:00
parent 02946d388a
commit 7ba0613401
5 changed files with 12 additions and 2469 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@github/actions-expressions",
"version": "0.0.9",
"version": "0.0.10",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
@@ -8,4 +8,12 @@ describe("dictionary", () => {
expect(d.pairs()).toEqual([{ key: "ABC", value: new StringData("val") }]);
});
it("does not add duplicate entries", () => {
const d = new Dictionary();
d.add("ABC", new StringData("val1"));
d.add("abc", new StringData("val2"));
expect(d.pairs()).toEqual([{ key: "ABC", value: new StringData("val1") }]);
});
});
+1 -1
View File
@@ -30,7 +30,7 @@ export class Dictionary implements ExpressionDataInterface {
}
add(key: string, value: ExpressionData) {
if (this.indexMap[key.toLowerCase()]) {
if (key.toLowerCase() in this.indexMap) {
return;
}
@@ -1,3 +1,4 @@
import { TokenType } from "../../templates/tokens/types"
import { ObjectReader } from "../object-reader"
import {
ALLOWED_VALUES,
@@ -46,7 +47,6 @@ import {
import { TemplateContext, TemplateValidationErrors } from "../template-context"
import { readTemplate } from "../template-reader"
import { MappingToken, SequenceToken, StringToken } from "../tokens"
import { TokenType } from "../tokens/types"
import { NoOperationTraceWriter } from "../trace-writer"
import { BooleanDefinition } from "./boolean-definition"
import { Definition } from "./definition"
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
../../../schema/workflow-v1.0.json