Merge pull request #12483 from backstage/renovate/yaml-2.x

fix(deps): update dependency yaml to v2
This commit is contained in:
Fredrik Adelöw
2022-07-08 11:31:34 +02:00
committed by GitHub
15 changed files with 51 additions and 27 deletions
@@ -51,7 +51,7 @@
"@backstage/cli": "^0.18.0-next.1",
"@types/lodash": "^4.14.151",
"aws-sdk-mock": "^5.2.1",
"yaml": "^1.9.2"
"yaml": "^2.0.0"
},
"files": [
"dist",
+1 -1
View File
@@ -63,7 +63,7 @@
"prom-client": "^14.0.1",
"uuid": "^8.0.0",
"winston": "^3.2.1",
"yaml": "^1.9.2",
"yaml": "^2.0.0",
"yn": "^4.0.0",
"zod": "^3.11.6"
},
@@ -414,7 +414,7 @@ describe('yamlPlaceholderResolver', () => {
it('rejects invalid yaml', async () => {
read.mockResolvedValue(Buffer.from('a: 1\n----\n', 'utf-8'));
await expect(yamlPlaceholderResolver(params)).rejects.toThrow(
'Placeholder $a found an error in the data at ./file.yaml, YAMLSemanticError: Implicit map keys need to be followed by map values',
/Placeholder \$a found an error in the data at .\/file.yaml, YAMLParseError: Implicit map keys need to be followed by map values at line 2, column 1:\s+a: 1/,
);
});
@@ -156,12 +156,16 @@ describe('parseEntityYaml', () => {
);
// Parse errors are always per document
expect(results).toEqual([
processingResult.generalError(
testLoc,
'YAML error at my-loc-type:my-loc-target, YAMLSemanticError: Plain value cannot start with reserved character `',
),
]);
expect(results.length).toBe(1);
expect(results[0]).toEqual({
type: 'error',
location: testLoc,
error: expect.objectContaining({
message: expect.stringMatching(
/YAML error at my-loc-type:my-loc-target, YAMLParseError: Plain value cannot start with reserved character ` at line 1, column 1:/,
),
}),
});
});
it('should emit parsing errors for individual documents', () => {
@@ -185,7 +189,8 @@ describe('parseEntityYaml', () => {
),
);
expect(results).toEqual([
expect(results.length).toBe(2);
expect(results[0]).toEqual(
processingResult.entity(testLoc, {
apiVersion: 'backstage.io/v1alpha1',
kind: 'Component',
@@ -196,11 +201,16 @@ describe('parseEntityYaml', () => {
type: 'website',
},
}),
processingResult.generalError(
testLoc,
'YAML error at my-loc-type:my-loc-target, YAMLSemanticError: Nested mappings are not allowed in compact mappings',
),
]);
);
expect(results[1]).toEqual({
type: 'error',
location: testLoc,
error: expect.objectContaining({
message: expect.stringMatching(
/YAML error at my-loc-type:my-loc-target, YAMLParseError: Nested mappings are not allowed in compact mappings at line 9, column 19:\s+apiVersion: backstage.io\/v1alpha1/,
),
}),
});
});
it('must be an object at root', () => {
+1 -1
View File
@@ -53,7 +53,7 @@
"react-hook-form": "^7.12.2",
"react-router": "6.0.0-beta.0",
"react-use": "^17.2.4",
"yaml": "^1.10.0"
"yaml": "^2.0.0"
},
"peerDependencies": {
"@types/react": "^16.13.1 || ^17.0.0",
+1 -1
View File
@@ -55,7 +55,7 @@
"qs": "^6.9.4",
"react-router": "6.0.0-beta.0",
"react-use": "^17.2.4",
"yaml": "^1.10.0",
"yaml": "^2.0.0",
"zen-observable": "^0.8.15"
},
"peerDependencies": {
+1 -1
View File
@@ -41,7 +41,7 @@
"morgan": "^1.10.0",
"uuid": "^8.0.0",
"winston": "^3.2.1",
"yaml": "^1.9.2",
"yaml": "^2.0.0",
"yn": "^4.0.0",
"yup": "^0.32.9"
},
+2 -2
View File
@@ -70,7 +70,7 @@
"p-limit": "^3.1.0",
"uuid": "^8.2.0",
"winston": "^3.2.1",
"yaml": "^1.10.0",
"yaml": "^2.0.0",
"vm2": "^3.9.6",
"zen-observable": "^0.8.15",
"zod": "^3.11.6"
@@ -90,7 +90,7 @@
"mock-fs": "^5.1.0",
"msw": "^0.43.0",
"supertest": "^6.1.3",
"yaml": "^1.10.0"
"yaml": "^2.0.0"
},
"files": [
"dist",
+1 -1
View File
@@ -72,7 +72,7 @@
"react-router-dom": "6.0.0-beta.0",
"react-use": "^17.2.4",
"use-immer": "^0.7.0",
"yaml": "^1.9.2",
"yaml": "^2.0.0",
"zen-observable": "^0.8.15"
},
"peerDependencies": {