From eea6f93c241e1095e63b5106039a39ec43c9d88c Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 6 Sep 2026 15:42:39 +0100 Subject: [PATCH 1/2] Support Transform and GetStackOutput YAML short forms --- lib/utils/serverless-utils/README.md | 5 +++-- lib/utils/serverless-utils/cloudformation-schema.js | 2 ++ .../serverless-utils/cloudformation-schema.test.js | 13 +++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/utils/serverless-utils/README.md b/lib/utils/serverless-utils/README.md index 8b2ca3933..ca4938d9c 100644 --- a/lib/utils/serverless-utils/README.md +++ b/lib/utils/serverless-utils/README.md @@ -28,8 +28,9 @@ Notes: - `cloudformation-schema.js` intentionally diverges from upstream: it removes implicit YAML timestamp resolution and re-registers `!!timestamp` as an - explicit type (https://github.com/oss-serverless/osls/issues/438). Preserve - this when re-syncing. + explicit type (https://github.com/oss-serverless/osls/issues/438), and it + adds the `!Transform` and `!GetStackOutput` short forms that upstream lacks. + Preserve this when re-syncing. - `config.js` is a locally owned fork. It intentionally keeps the synchronous `get('frameworkId')` and `get('meta.created_at')` lookups that Bref v2/v3 use for best-effort telemetry if a future compatibility shim routes diff --git a/lib/utils/serverless-utils/cloudformation-schema.js b/lib/utils/serverless-utils/cloudformation-schema.js index b5afb7142..1798fd807 100644 --- a/lib/utils/serverless-utils/cloudformation-schema.js +++ b/lib/utils/serverless-utils/cloudformation-schema.js @@ -11,6 +11,7 @@ const functionNames = [ 'FindInMap', 'GetAtt', 'GetAZs', + 'GetStackOutput', 'If', 'ImportValue', 'Join', @@ -20,6 +21,7 @@ const functionNames = [ 'Select', 'Split', 'Sub', + 'Transform', ]; const yamlType = (name, kind) => { diff --git a/test/unit/lib/utils/serverless-utils/cloudformation-schema.test.js b/test/unit/lib/utils/serverless-utils/cloudformation-schema.test.js index 1b8ed2d8a..af7805ed1 100644 --- a/test/unit/lib/utils/serverless-utils/cloudformation-schema.test.js +++ b/test/unit/lib/utils/serverless-utils/cloudformation-schema.test.js @@ -17,4 +17,17 @@ describe('serverless-utils/cloudformation-schema', () => { it('should construct a Date for an explicit timestamp tag', () => { expect(load('date: !!timestamp 2020-12-12').date).to.be.instanceOf(Date); }); + + it('should construct the Transform and GetStackOutput short forms', () => { + expect( + load( + 'value: !Transform\n Name: AWS::Include\n Parameters:\n Location: s3://bucket/x.yml' + ).value + ).to.deep.equal({ + 'Fn::Transform': { Name: 'AWS::Include', Parameters: { Location: 's3://bucket/x.yml' } }, + }); + expect( + load('value: !GetStackOutput\n StackName: producer\n OutputName: VpcId').value + ).to.deep.equal({ 'Fn::GetStackOutput': { StackName: 'producer', OutputName: 'VpcId' } }); + }); }); From 583a955ec7c7cbb5dc368d0e0d10643599a844d3 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 6 Sep 2026 15:57:04 +0100 Subject: [PATCH 2/2] Cite the tracking issue in the schema divergence note --- lib/utils/serverless-utils/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/utils/serverless-utils/README.md b/lib/utils/serverless-utils/README.md index ca4938d9c..820586742 100644 --- a/lib/utils/serverless-utils/README.md +++ b/lib/utils/serverless-utils/README.md @@ -29,8 +29,9 @@ Notes: - `cloudformation-schema.js` intentionally diverges from upstream: it removes implicit YAML timestamp resolution and re-registers `!!timestamp` as an explicit type (https://github.com/oss-serverless/osls/issues/438), and it - adds the `!Transform` and `!GetStackOutput` short forms that upstream lacks. - Preserve this when re-syncing. + adds the `!Transform` and `!GetStackOutput` short forms that upstream lacks + (https://github.com/oss-serverless/osls/issues/450). Preserve this when + re-syncing. - `config.js` is a locally owned fork. It intentionally keeps the synchronous `get('frameworkId')` and `get('meta.created_at')` lookups that Bref v2/v3 use for best-effort telemetry if a future compatibility shim routes