Merge branch 'main' into allanguigou/case

This commit is contained in:
Allan Guigou
2026-01-14 13:51:13 +00:00
14 changed files with 694 additions and 136 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/expressions",
"version": "0.3.34",
"version": "0.3.35",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
+5 -1
View File
@@ -51,7 +51,11 @@ describe("FeatureFlags", () => {
it("returns all features when all is enabled", () => {
const flags = new FeatureFlags({all: true});
expect(flags.getEnabledFeatures()).toEqual(["missingInputsQuickfix", "blockScalarChompingWarning"]);
expect(flags.getEnabledFeatures()).toEqual([
"missingInputsQuickfix",
"blockScalarChompingWarning",
"actionScaffoldingSnippets"
]);
});
});
});
+13 -1
View File
@@ -29,6 +29,13 @@ export interface ExperimentalFeatures {
*/
blockScalarChompingWarning?: boolean;
/**
* Enable action scaffolding snippets in action.yml files.
* Offers Node.js, Composite, and Docker action scaffolds.
* @default false
*/
actionScaffoldingSnippets?: boolean;
/**
* Enable the case() function in expressions.
* @default false
@@ -45,7 +52,12 @@ export type ExperimentalFeatureKey = Exclude<keyof ExperimentalFeatures, "all">;
* All known experimental feature keys.
* This list must be kept in sync with the ExperimentalFeatures interface.
*/
const allFeatureKeys: ExperimentalFeatureKey[] = ["missingInputsQuickfix", "blockScalarChompingWarning", "allowCaseFunction"];
const allFeatureKeys: ExperimentalFeatureKey[] = [
"missingInputsQuickfix",
"blockScalarChompingWarning",
"actionScaffoldingSnippets",
"allowCaseFunction",
];
export class FeatureFlags {
private readonly features: ExperimentalFeatures;