Skip to content

Commit

Permalink
refactor: Use @serverless/utils for cloudformationSchema (#8705)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericbarthelet committed Jan 6, 2021
1 parent 4460383 commit 2efc357
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 76 deletions.
54 changes: 0 additions & 54 deletions lib/plugins/aws/lib/cloudformationSchema.js

This file was deleted.

4 changes: 2 additions & 2 deletions lib/utils/fs/parse.js
Expand Up @@ -3,7 +3,7 @@
const jc = require('json-cycle');
const yaml = require('js-yaml');
const _ = require('lodash');
const cloudFormationSchema = require('../../plugins/aws/lib/cloudformationSchema');
const cloudformationSchema = require('@serverless/utils/cloudformation-schema');

const loadYaml = (contents, options) => {
let data;
Expand All @@ -26,7 +26,7 @@ function parse(filePath, contents) {
};
let result = loadYaml(contents.toString(), options);
if (result.error && result.error.name === 'YAMLException') {
_.merge(options, { schema: cloudFormationSchema.schema });
_.merge(options, { schema: cloudformationSchema });
result = loadYaml(contents.toString(), options);
}
if (result.error) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -25,7 +25,7 @@
"@serverless/cli": "^1.5.2",
"@serverless/components": "^3.4.3",
"@serverless/enterprise-plugin": "^4.4.0",
"@serverless/utils": "^2.1.0",
"@serverless/utils": "^2.2.0",
"ajv": "^7.0.3",
"ajv-keywords": "^4.0.0",
"archiver": "^5.1.0",
Expand Down
19 changes: 0 additions & 19 deletions test/unit/lib/plugins/aws/lib/cloudformationSchema.test.js

This file was deleted.

0 comments on commit 2efc357

Please sign in to comment.