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

[sdk/nodejs] Fix regression when passing a provider to a MLC #11509

Merged
merged 1 commit into from Dec 2, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: sdk/nodejs
description: Fix regression when passing a provider to a MLC
2 changes: 1 addition & 1 deletion sdk/nodejs/runtime/resource.ts
Expand Up @@ -529,7 +529,7 @@ async function prepareResource(label: string, res: Resource, parent: Resource |

let providerRef: string | undefined;
let importID: ID | undefined;
if (custom || remote) {
if (custom) {
const customOpts = <CustomResourceOptions>opts;
importID = customOpts.import;
providerRef = await ProviderResource.register(opts.provider);
Expand Down
1 change: 1 addition & 0 deletions sdk/nodejs/tests/runtime/langhost/run.spec.ts
Expand Up @@ -1214,6 +1214,7 @@ describe("rpc", () => {
propertyDeps?: any, ignoreChanges?: string[], version?: string, importID?: string,
replaceOnChanges?: string[], providers?: any) => {
if (name === "singular" || name === "map" || name === "array") {
assert.strictEqual(provider, "");
assert.deepStrictEqual(Object.keys(providers), ["test"]);
}
return { urn: makeUrn(t, name), id: undefined, props: undefined };
Expand Down