Skip to content

Commit

Permalink
Update glob options for nodejs SDK to be backwards compatible
Browse files Browse the repository at this point in the history
    newest version of this package drops the leading `./` for relative
file paths. This commit updates this behaviour to maintain backwards
compatability.
  • Loading branch information
rquitales committed Mar 5, 2024
1 parent e74728b commit 9015392
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions provider/pkg/gen/nodejs-templates/yaml/yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,14 @@ export interface ConfigOpts {
if (isUrl(config.files)) {
files = [config.files];
} else {
files = glob.sync(config.files);
files = glob.sync(config.files, {dotRelative: true});
}
} else {
for (const file of config.files) {
if (isUrl(file)) {
files.push(file);
} else {
files.push(...glob.sync(file));
files.push(...glob.sync(file, {dotRelative: true}));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions sdk/nodejs/yaml/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3268,14 +3268,14 @@ export interface ConfigOpts {
if (isUrl(config.files)) {
files = [config.files];
} else {
files = glob.sync(config.files);
files = glob.sync(config.files, {dotRelative: true});
}
} else {
for (const file of config.files) {
if (isUrl(file)) {
files.push(file);
} else {
files.push(...glob.sync(file));
files.push(...glob.sync(file, {dotRelative: true}));
}
}
}
Expand Down

0 comments on commit 9015392

Please sign in to comment.