Skip to content

Commit

Permalink
Merge #11534
Browse files Browse the repository at this point in the history
11534: Revert "Merge #10831" r=aq17 a=aq17

This reverts commit 184903a, reversing changes made to 356d8eb.

Fixes #11531  (see comments for further context)


Co-authored-by: aq17 <aqiu@pulumi.com>
  • Loading branch information
bors[bot] and aq17 committed Dec 5, 2022
2 parents a079941 + 20e5b33 commit 86e7d56
Show file tree
Hide file tree
Showing 142 changed files with 195 additions and 1,318 deletions.
386 changes: 47 additions & 339 deletions pkg/codegen/nodejs/gen.go

Large diffs are not rendered by default.

48 changes: 0 additions & 48 deletions pkg/codegen/nodejs/gen_test.go
Expand Up @@ -236,51 +236,3 @@ func Test_isStringType(t *testing.T) {
})
}
}

// This test asserts that getRelativePath()
// returns the right relative path. This smoke test
// functions to pin the expected behavior to prevent regressions.
func TestGetRelativePath(t *testing.T) {
t.Parallel()
type TestCase struct {
filename string
expected string
}
// Recall that arguments are assumed to be directory names,
// even if they contain an extension.
var cases = []TestCase{
{
filename: "foo.ts",
expected: "..",
}, {
filename: "foo/bar",
expected: "../..",
}, {
filename: "types/accessanalyzer/input",
expected: "../../..",
}, {
filename: "types/accessanalyzer/nested/input.ts",
expected: "../../../..",
}, {
filename: "types",
expected: "..",
}, {
filename: "./types/aws",
expected: "../..",
}, {
filename: "./types",
expected: "..",
}}
for _, tc := range cases {
var observed = getRelativePath(tc.filename)
require.Equal(
t,
tc.expected,
observed,
"Case (%s): Expected %s, Observed %s",
tc.filename,
tc.expected,
observed,
)
}
}
6 changes: 0 additions & 6 deletions pkg/codegen/testing/test/sdk_driver.go
Expand Up @@ -164,12 +164,6 @@ var PulumiPulumiSDKTests = []*SDKTest{
Description: "A resource with the same name as its property",
SkipCompileCheck: codegen.NewStringSet(dotnet, nodejs),
},
{
Directory: "type-references-resource",
Description: "An instance where a type references a resource",
Skip: allLanguages.Except("nodejs/any"),
// SkipCompileCheck: codegen.NewStringSet(dotnet, golang, python),
},
{
Directory: "hyphen-url",
Description: "A resource url with a hyphen in its path",
Expand Down
Expand Up @@ -8,9 +8,6 @@
"provider.ts",
"scripts/install-pulumi-plugin.js",
"tsconfig.json",
"types/documentdb/index.ts",
"types/documentdb/input.ts",
"types/documentdb/output.ts",
"types/index.ts",
"types/input.ts",
"types/output.ts",
Expand Down
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
Expand All @@ -11,19 +10,13 @@
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["*"]
},
"strict": true
},
"files": [
"documentdb/index.ts",
"documentdb/sqlResourceSqlContainer.ts",
"index.ts",
"provider.ts",
"types/documentdb/index.ts",
"types/documentdb/input.ts",
"types/documentdb/output.ts",
"types/index.ts",
"types/input.ts",
"types/output.ts",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Expand Up @@ -4,6 +4,6 @@
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as utilities from "../utilities";

export * as documentdb from "./documentdb/input";
export namespace documentdb {
}
Expand Up @@ -4,6 +4,34 @@
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as utilities from "../utilities";

export * as documentdb from "./documentdb/output";
export namespace documentdb {
export interface CompositePathResponse {
/**
* Sort order for composite paths.
*/
order?: string;
/**
* The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
*/
path?: string;
}

/**
* Cosmos DB indexing policy
*/
export interface IndexingPolicyResponse {
/**
* List of composite path list
*/
compositeIndexes?: outputs.documentdb.CompositePathResponse[][];
}

export interface SqlContainerGetPropertiesResponseResource {
/**
* The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container
*/
indexingPolicy?: outputs.documentdb.IndexingPolicyResponse;
}

}
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
Expand All @@ -11,9 +10,6 @@
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["*"]
},
"strict": true
},
"files": [
Expand Down
Expand Up @@ -4,5 +4,4 @@
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as utilities from "../utilities";

Expand Up @@ -4,5 +4,4 @@
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as utilities from "../utilities";

@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
Expand All @@ -11,9 +10,6 @@
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["*"]
},
"strict": true
},
"files": [
Expand Down
Expand Up @@ -4,7 +4,6 @@
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as utilities from "../utilities";

export interface TopLevelArgs {
buzz?: pulumi.Input<string>;
Expand Down
Expand Up @@ -4,7 +4,6 @@
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as utilities from "../utilities";

export interface TopLevel {
buzz?: string;
Expand Down
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
Expand All @@ -11,9 +10,6 @@
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["*"]
},
"strict": true
},
"files": [
Expand Down
Expand Up @@ -5,6 +5,7 @@ import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";

import * as utilities from "../utilities";

export interface ContainerArgs {
Expand Down
Expand Up @@ -5,6 +5,7 @@ import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";

import * as utilities from "../utilities";

export interface Container {
Expand Down
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
Expand All @@ -11,9 +10,6 @@
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["*"]
},
"strict": true
},
"files": [
Expand Down
Expand Up @@ -5,6 +5,7 @@ import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";

import * as utilities from "../utilities";

export interface ContainerArgs {
Expand Down
Expand Up @@ -5,6 +5,7 @@ import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";

import * as utilities from "../utilities";

export interface Container {
Expand Down
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
Expand All @@ -11,9 +10,6 @@
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["*"]
},
"strict": true
},
"files": [
Expand Down
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
Expand All @@ -11,9 +10,6 @@
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["*"]
},
"strict": true
},
"files": [
Expand Down
Expand Up @@ -5,5 +5,4 @@ import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
import * as utilities from "../utilities";

Expand Up @@ -5,5 +5,4 @@ import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
import * as utilities from "../utilities";

@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
Expand All @@ -11,9 +10,6 @@
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["*"]
},
"strict": true
},
"files": [
Expand Down

0 comments on commit 86e7d56

Please sign in to comment.