Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
test:
strategy:
matrix:
node-version: ['18.x', '20.x', '22.x']
node-version: ['20.x', '22.x', '24.x']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
14 changes: 9 additions & 5 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ const exec = require('child_process').execSync;
const path = require('path');
const _ = require('lodash');
const pathParse = require('path-parse');
const yargs = require('yargs');

const include = require('../index');
const yaml = require('../lib/yaml');
const Client = require('../lib/cfnclient');
const pkg = require('../package.json');
const replaceEnv = require('../lib/replaceEnv');

yargs.version(false);

const { env } = process;

const opts = yargs

(async () => {
const { default : yargs } = await import('yargs');
const { hideBin } = await import('yargs/helpers');

const opts = yargs(hideBin(process.argv))
.version(false)
.command('$0 [path] [options]', pkg.description, (y) =>
y.positional('path', {
positional: true,
Expand Down Expand Up @@ -189,3 +191,5 @@ promise
console.log(err.stack);
process.exit(1);
});

})();
2 changes: 1 addition & 1 deletion lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const BANG_AMAZON_FUNCS = [

const EXPLICIT_AMAZON_FUNCS = BANG_AMAZON_FUNCS.map((f) => `Fn::${f}`);

module.exports = yaml.Schema.create(tags);
module.exports = yaml.DEFAULT_SCHEMA.extend(tags);

module.exports.EXPLICIT_AMAZON_FUNCS = EXPLICIT_AMAZON_FUNCS;
module.exports.BANG_AMAZON_FUNCS = BANG_AMAZON_FUNCS;
Expand Down
2 changes: 1 addition & 1 deletion lib/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
load: (res) => {
let json;
try {
json = yaml.safeLoad(res, { schema: yamlSchema });
json = yaml.load(res, { schema: yamlSchema });
} catch (yamlErr) {
try {
json = JSON.parse(minify(res));
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"name": "Nicholas McCready",
"email": "nemtcan@gmail.com"
},
"main": "index.js",
"bin": {
"cfn-include": "bin/cli.js"
},
Expand All @@ -43,19 +42,19 @@
"dependencies": {
"@aws-sdk/client-cloudformation": "^3.637.0",
"@aws-sdk/client-s3": "^3.637.0",
"@znemz/cft-utils": "0.1.19",
"@znemz/cft-utils": "0.1.23",
"@znemz/sort-object": "^3.0.4",
"aws-sdk-v3-proxy": "2.2.0",
"bluebird": "^3.7.2",
"deepmerge": "^4.2.2",
"glob": "^11.0.1",
"glob": "^12.0.0",
"jmespath": "^0.16.0",
"js-yaml": "^3.14.1",
"js-yaml": "^4.1.1",
"jsonminify": "^0.4.1",
"lodash": "^4.17.21",
"path-parse": "~1.0.7",
"proxy-agent": "6.5.0",
"yargs": "~17.7.2"
"yargs": "~18.0.0"
},
"devDependencies": {
"@commitlint/cli": "^20",
Expand All @@ -67,7 +66,7 @@
"eslint-config-prettier": "10",
"eslint-plugin-mocha": "11",
"eslint-plugin-prettier": "5",
"mocha": "11.7.2",
"mocha": "11.7.5",
"npm-run-all": "4.1.5",
"prettier": "3",
"serve": "14.2.5",
Expand Down