Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(applet-js): Switch to JS-YAML for consistency #950

Merged
merged 1 commit into from
Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/@aws-cdk/applet-js/bin/cdk-applet-js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import 'source-map-support/register';

import cdk = require('@aws-cdk/cdk');
import fs = require('fs-extra');
import path = require('path');

// tslint:disable-next-line:no-var-requires
const YAML = require('yamljs');
const YAML = require('js-yaml');

main().catch(e => {
// tslint:disable-next-line:no-console
Expand All @@ -22,7 +23,7 @@ async function main() {
}

// read applet properties from the provided file
const props = YAML.load(appletFile);
const props = YAML.safeLoad(await fs.readFile(appletFile, { encoding: 'utf-8' }));

// the 'applet' attribute tells us how to load the applet. in the javascript case
// it will be in the format <module>:<class> where <module> is technically passed to "require"
Expand Down
7 changes: 5 additions & 2 deletions packages/@aws-cdk/applet-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
},
"dependencies": {
"@aws-cdk/cdk": "^0.12.0",
"source-map-support": "^0.5.6",
"yamljs": "^0.2.0"
"@types/fs-extra": "^5.0.4",
"@types/js-yaml": "^3.11.2",
"fs-extra": "^7.0.0",
"js-yaml": "^3.12.0",
"source-map-support": "^0.5.6"
},
"repository": {
"url": "https://github.com/awslabs/aws-cdk.git",
Expand Down