@azure-tools/typespec-azure-resource-manager 0.38.0-dev.2 → 0.38.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/lib.d.ts CHANGED
@@ -38,7 +38,7 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
38
38
  "parent-type": {
39
39
  notResourceType: import("@typespec/compiler").CallableMessage<[string, string]>;
40
40
  };
41
- }, Record<string, any>>;
41
+ }, Record<string, any>, never>;
42
42
  export declare const reportDiagnostic: <C extends "single-arm-provider" | "decorator-param-wrong-type" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-missing-name-property" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-segment-decorator" | "arm-resource-missing-arm-namespace" | "arm-resource-invalid-base-type" | "arm-resource-missing" | "arm-common-types-incompatible-version" | "decorator-in-namespace" | "parent-type", M extends keyof {
43
43
  "single-arm-provider": {
44
44
  default: string;
@@ -1 +1 @@
1
- {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA4Jf,CAAC;AAEH,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAAS,CAAC"}
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA4Jf,CAAC;AAEH,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,eAAO,MAAM,+BAA+B,EAAE,mBAoB7C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGpB,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,+BAA+B,EAAE,mBAG5C,CAAC"}
@@ -1,24 +1,6 @@
1
- import { resolvePath } from "@typespec/compiler";
2
- import { fileURLToPath } from "url";
3
- export const AzureResourceManagerTestLibrary = {
1
+ import { createTestLibrary, findTestPackageRoot, } from "@typespec/compiler/testing";
2
+ export const AzureResourceManagerTestLibrary = createTestLibrary({
4
3
  name: "@azure-tools/typespec-azure-resource-manager",
5
- packageRoot: resolvePath(fileURLToPath(import.meta.url), "../../../../"),
6
- files: [
7
- {
8
- realDir: "",
9
- pattern: "package.json",
10
- virtualPath: "./node_modules/@azure-tools/typespec-azure-resource-manager",
11
- },
12
- {
13
- realDir: "dist/src",
14
- pattern: "*.js",
15
- virtualPath: "./node_modules/@azure-tools/typespec-azure-resource-manager/dist/src",
16
- },
17
- {
18
- realDir: "lib",
19
- pattern: "*.tsp",
20
- virtualPath: "./node_modules/@azure-tools/typespec-azure-resource-manager/lib",
21
- },
22
- ],
23
- };
4
+ packageRoot: await findTestPackageRoot(import.meta.url),
5
+ });
24
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,CAAC,MAAM,+BAA+B,GAAwB;IAClE,IAAI,EAAE,8CAA8C;IACpD,WAAW,EAAE,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;IACxE,KAAK,EAAE;QACL;YACE,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,cAAc;YACvB,WAAW,EAAE,6DAA6D;SAC3E;QACD;YACE,OAAO,EAAE,UAAU;YACnB,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,sEAAsE;SACpF;QACD;YACE,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,iEAAiE;SAC/E;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,+BAA+B,GAAwB,iBAAiB,CAAC;IACpF,IAAI,EAAE,8CAA8C;IACpD,WAAW,EAAE,MAAM,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;CACxD,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
3
+ //# sourceMappingURL=vitest.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";AAEA,wBAWG"}
@@ -0,0 +1,14 @@
1
+ import { defineConfig } from "vitest/config";
2
+ export default defineConfig({
3
+ test: {
4
+ environment: "node",
5
+ isolate: false,
6
+ coverage: {
7
+ reporter: ["cobertura", "json", "text"],
8
+ },
9
+ outputFile: {
10
+ junit: "./test-results.xml",
11
+ },
12
+ },
13
+ });
14
+ //# sourceMappingURL=vitest.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAe,YAAY,CAAC;IAC1B,IAAI,EAAE;QACJ,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE;YACR,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC;SACxC;QACD,UAAU,EAAE;YACV,KAAK,EAAE,oBAAoB;SAC5B;KACF;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-resource-manager",
3
- "version": "0.38.0-dev.2",
3
+ "version": "0.38.0-dev.4",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Resource Manager library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -55,16 +55,14 @@
55
55
  "@typespec/rest": "~0.51.0 || >=0.52.0-dev <0.52.0",
56
56
  "@typespec/http": "~0.51.0 || >=0.52.0-dev <0.52.0",
57
57
  "@typespec/versioning": "~0.51.0 || >=0.52.0-dev <0.52.0",
58
- "@types/mocha": "~10.0.6",
59
58
  "@types/node": "~18.11.9",
60
59
  "@typespec/eslint-config-typespec": "~0.51.0 || >=0.52.0-dev <0.52.0",
61
60
  "@typespec/library-linter": "~0.51.0 || >=0.52.0-dev <0.52.0",
62
61
  "@typespec/eslint-plugin": "~0.51.0 || >=0.52.0-dev <0.52.0",
63
62
  "@typespec/tspd": "~0.46.0 || >=0.47.0-dev <0.47.0",
64
63
  "eslint": "^8.55.0",
65
- "mocha": "~10.2.0",
66
- "mocha-junit-reporter": "~2.2.1",
67
- "mocha-multi-reporters": "~1.5.1",
64
+ "vitest": "^1.1.0",
65
+ "@vitest/coverage-v8": "^1.1.0",
68
66
  "c8": "~8.0.1",
69
67
  "rimraf": "~5.0.1",
70
68
  "typescript": "~5.3.3"
@@ -75,8 +73,9 @@
75
73
  "build": "tsc -p . && npm run lint-typespec-library",
76
74
  "watch": "tsc -p . --watch",
77
75
  "lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit",
78
- "test": "mocha",
79
- "test-official": "c8 mocha --forbid-only --reporter mocha-multi-reporters",
76
+ "test": "vitest run",
77
+ "test:watch": "vitest -w",
78
+ "test-official": "vitest run --coverage --reporter=junit --reporter=default --no-file-parallelism",
80
79
  "lint": "eslint . --ext .ts --max-warnings=0",
81
80
  "lint:fix": "eslint . --fix --ext .ts",
82
81
  "regen-docs": "tspd doc . --enable-experimental --output-dir ../../docs/libraries/azure-resource-manager/reference"