Bring in latest changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@github/actions-expressions",
|
"name": "@github/actions-expressions",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
|||||||
@@ -8,4 +8,12 @@ describe("dictionary", () => {
|
|||||||
|
|
||||||
expect(d.pairs()).toEqual([{ key: "ABC", value: new StringData("val") }]);
|
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") }]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export class Dictionary implements ExpressionDataInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add(key: string, value: ExpressionData) {
|
add(key: string, value: ExpressionData) {
|
||||||
if (this.indexMap[key.toLowerCase()]) {
|
if (key.toLowerCase() in this.indexMap) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { TokenType } from "../../templates/tokens/types"
|
||||||
import { ObjectReader } from "../object-reader"
|
import { ObjectReader } from "../object-reader"
|
||||||
import {
|
import {
|
||||||
ALLOWED_VALUES,
|
ALLOWED_VALUES,
|
||||||
@@ -46,7 +47,6 @@ import {
|
|||||||
import { TemplateContext, TemplateValidationErrors } from "../template-context"
|
import { TemplateContext, TemplateValidationErrors } from "../template-context"
|
||||||
import { readTemplate } from "../template-reader"
|
import { readTemplate } from "../template-reader"
|
||||||
import { MappingToken, SequenceToken, StringToken } from "../tokens"
|
import { MappingToken, SequenceToken, StringToken } from "../tokens"
|
||||||
import { TokenType } from "../tokens/types"
|
|
||||||
import { NoOperationTraceWriter } from "../trace-writer"
|
import { NoOperationTraceWriter } from "../trace-writer"
|
||||||
import { BooleanDefinition } from "./boolean-definition"
|
import { BooleanDefinition } from "./boolean-definition"
|
||||||
import { Definition } from "./definition"
|
import { Definition } from "./definition"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
|||||||
|
../../../schema/workflow-v1.0.json
|
||||||
Reference in New Issue
Block a user