@azure-tools/typespec-azure-core 0.35.0-dev.8 → 0.35.0

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.
@@ -18,8 +18,8 @@ export const noErrorStatusCodesRule = createRule({
18
18
  const httpOperation = ignoreDiagnostics(getHttpOperation(context.program, operation));
19
19
  if (httpOperation.responses !== undefined) {
20
20
  for (const response of httpOperation.responses) {
21
- const statusCode = parseInt(response.statusCode);
22
- if (statusCode >= 400 && statusCode < 600) {
21
+ const statusCode = response.statusCodes;
22
+ if (typeof statusCode === "number" && statusCode >= 400 && statusCode < 600) {
23
23
  context.reportDiagnostic({
24
24
  target: operation,
25
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"no-error-status-codes.js","sourceRoot":"","sources":["../../../src/rules/no-error-status-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErE,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC;IAC/C,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,0EAA0E;IACvF,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE;QACR,OAAO,EACL,uIAAuI;KAC1I;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,SAAS,EAAE,CAAC,SAAoB,EAAE,EAAE;gBAClC,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC;oBAAE,OAAO;gBAC3D,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC;oBAAE,OAAO;gBAEvE,MAAM,aAAa,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,SAA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CAAC,SAAS,KAAK,SAAS,EAAE;oBACzC,KAAK,MAAM,QAAQ,IAAI,aAAa,CAAC,SAAS,EAAE;wBAC9C,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC;wBACxC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,EAAE;4BAC3E,OAAO,CAAC,gBAAgB,CAAC;gCACvB,MAAM,EAAE,SAAS;6BAClB,CAAC,CAAC;yBACJ;qBACF;iBACF;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -16,13 +16,13 @@ export const noResponseBodyRule = createRule({
16
16
  return;
17
17
  if (!isAzureSubNamespace(context.program, op.namespace))
18
18
  return;
19
- const responses = getResponsesForOperation(context.program, op)[0].find((v) => v.statusCode !== "204");
19
+ const responses = getResponsesForOperation(context.program, op)[0].find((v) => v.statusCodes !== 204);
20
20
  if (responses && !responses.responses.every((v) => v.body)) {
21
21
  context.reportDiagnostic({
22
22
  target: op,
23
23
  });
24
24
  }
25
- const responses204 = getResponsesForOperation(context.program, op)[0].find((v) => v.statusCode === "204");
25
+ const responses204 = getResponsesForOperation(context.program, op)[0].find((v) => v.statusCodes === 204);
26
26
  if (responses204 && responses204.responses.some((v) => v.body)) {
27
27
  context.reportDiagnostic({
28
28
  target: op,
@@ -1 +1 @@
1
- {"version":3,"file":"no-response-body.js","sourceRoot":"","sources":["../../../src/rules/no-response-body.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhF,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,8DAA8D;IAC3E,QAAQ,EAAE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AAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;oBAC9D,OAAO,CAAC,gBAAgB,CAAC;wBACvB,MAAM,EAAE,EAAE;wBACV,SAAS,EAAE,aAAa;qBACzB,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -52,7 +52,7 @@ export const useStandardNames = createRule({
52
52
  const httpOp = ignoreDiagnostics(getHttpOperation(context.program, op));
53
53
  const verb = httpOp.verb;
54
54
  const name = op.name;
55
- const statusCodes = httpOp.responses.map((x) => x.statusCode.toString());
55
+ const statusCodes = httpOp.responses.map((x) => x.statusCodes.toString());
56
56
  // operation is a list if it is decoratored as such (for example, through a template) or returns a paged result
57
57
  const isList = isListOperation(context.program, op) || getPagedResult(context.program, op) !== undefined;
58
58
  let errorMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"use-standard-names.js","sourceRoot":"","sources":["../../../src/rules/use-standard-names.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EACV,iBAAiB,EACjB,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErE,SAAS,sBAAsB,CAAC,EAAyB;IACvD,IAAI,CAAC,EAAE;QAAE,OAAO,KAAK,CAAC;IACtB,KAAK,MAAM,GAAG,IAAI,EAAE,CAAC,UAAU,EAAE;QAC/B,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,KAAK,uBAAuB,EAAE;YAClD,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAA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,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAC9D;4BACA,YAAY,GAAG,WAAW,CAAC;yBAC5B;6BAAM,IACL,KAAK;4BACL,CAAC,KAAK;4BACN,CAAC,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAC/D;4BACA,YAAY,GAAG,YAAY,CAAC;yBAC7B;wBACD,MAAM;oBACR,KAAK,OAAO;wBACV,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAC;wBAC3E,IAAI,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE;4BAC3E,YAAY,GAAG,OAAO,CAAC;yBACxB;wBACD,MAAM;oBACR,KAAK,QAAQ;wBACX,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;4BAC9B,YAAY,GAAG,QAAQ,CAAC;yBACzB;wBACD,MAAM;iBACT;gBACD,IAAI,YAAY,KAAK,SAAS,EAAE;oBAC9B,OAAO,CAAC,gBAAgB,CAAC;wBACvB,SAAS,EAAE,YAAY;wBACvB,MAAM,EAAE,EAAE;qBACX,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -508,7 +508,10 @@ alias StandardResourceOperations = ResourceOperations<NoConditionalRequests &
508
508
  NoClientRequestId>;
509
509
 
510
510
  /**
511
- * DEPRECATED: Use ResourceCreateOrReplace from the ResourceOperations interface.
511
+ * DEPRECATED: Use `ResourceCreateOrReplace` from a `ResourceOperations` interface instance.
512
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
513
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
514
+ *
512
515
  * Operation signature to create or replace a resource.
513
516
  * @template TResource The type of the resource.
514
517
  * @template Traits Traits to apply to the operation.
@@ -519,7 +522,10 @@ op ResourceCreateOrReplace<
519
522
  > is StandardResourceOperations.ResourceCreateOrReplace<TResource, Traits>;
520
523
 
521
524
  /**
522
- * DEPRECATED: Use LongRunningResourceCreateOrReplace from the ResourceOperations interface.
525
+ * DEPRECATED: Use `LongRunningResourceCreateOrReplace` from a `ResourceOperations` interface instance.
526
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
527
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
528
+ *
523
529
  * Long-running operation signature to create or replace a resource.
524
530
  * @template TResource The type of the resource.
525
531
  * @template Traits Traits to apply to the operation.
@@ -530,7 +536,10 @@ op LongRunningResourceCreateOrReplace<
530
536
  > is StandardResourceOperations.LongRunningResourceCreateOrReplace<TResource, Traits>;
531
537
 
532
538
  /**
533
- * DEPRECATED: Use ResourceCreateOrUpdate from the ResourceOperations interface.
539
+ * DEPRECATED: Use `ResourceCreateOrUpdate` from a `ResourceOperations` interface instance.
540
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
541
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
542
+ *
534
543
  * Operation signature to create or update a resource.
535
544
  * @template TResource The type of the resource.
536
545
  * @template Traits Traits to apply to the operation.
@@ -541,7 +550,10 @@ op ResourceCreateOrUpdate<
541
550
  > is StandardResourceOperations.ResourceCreateOrUpdate<TResource, Traits>;
542
551
 
543
552
  /**
544
- * DEPRECATED: Use LongRunningResourceCreateOrUpdate from the ResourceOperations interface.
553
+ * DEPRECATED: Use `LongRunningResourceCreateOrUpdate` from a `ResourceOperations` interface instance.
554
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
555
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
556
+ *
545
557
  * Long-running operation signature to create or update a resource.
546
558
  * @template TResource The type of the resource.
547
559
  * @template Traits Traits to apply to the operation.
@@ -552,7 +564,9 @@ op LongRunningResourceCreateOrUpdate<
552
564
  > is StandardResourceOperations.LongRunningResourceCreateOrUpdate<TResource, Traits>;
553
565
 
554
566
  /**
555
- * DEPRECATED: Use ResourceUpdate from the ResourceOperations interface.
567
+ * DEPRECATED: Use `ResourceUpdate` from a `ResourceOperations` interface instance.
568
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
569
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
556
570
  * Operation signature to update a resource.
557
571
  * @template TResource The type of the resource.
558
572
  * @template Traits Traits to apply to the operation.
@@ -563,7 +577,10 @@ op ResourceUpdate<
563
577
  > is StandardResourceOperations.ResourceUpdate<TResource, Traits>;
564
578
 
565
579
  /**
566
- * DEPRECATED: Use ResourceCreateWithServiceProvidedName from the ResourceOperations interface.
580
+ * DEPRECATED: Use `ResourceCreateWithServiceProvidedName` from a `ResourceOperations` interface instance.
581
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
582
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
583
+ *
567
584
  * Operation signature to synchronously create a resource with a service-provided name.
568
585
  * @template TResource The type of the resource.
569
586
  * @template Traits Traits to apply to the operation.
@@ -574,7 +591,10 @@ op ResourceCreateWithServiceProvidedName<
574
591
  > is StandardResourceOperations.ResourceCreateWithServiceProvidedName<TResource, Traits>;
575
592
 
576
593
  /**
577
- * DEPRECATED: Use LongRunningResourceCreateWithServiceProvidedName from the ResourceOperations interface.
594
+ * DEPRECATED: Use `LongRunningResourceCreateWithServiceProvidedName` from a `ResourceOperations` interface instance.
595
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
596
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
597
+ *
578
598
  * Long-running operation signature to create a resource with a service-provided name.
579
599
  * @template TResource The type of the resource.
580
600
  * @template Traits Traits to apply to the operation.
@@ -585,7 +605,10 @@ op LongRunningResourceCreateWithServiceProvidedName<
585
605
  > is StandardResourceOperations.LongRunningResourceCreateWithServiceProvidedName<TResource, Traits>;
586
606
 
587
607
  /**
588
- * DEPRECATED: Use ResourceRead from the ResourceOperations interface.
608
+ * DEPRECATED: Use `ResourceRead` from a `ResourceOperations` interface instance.
609
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
610
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
611
+ *
589
612
  * Operation signature to retrieve a resource.
590
613
  * @template TResource The type of the resource.
591
614
  * @template Traits Traits to apply to the operation.
@@ -596,7 +619,10 @@ op ResourceRead<
596
619
  > is StandardResourceOperations.ResourceRead<TResource, Traits>;
597
620
 
598
621
  /**
599
- * DEPRECATED: Use ResourceDelete from the ResourceOperations interface.
622
+ * DEPRECATED: Use `ResourceDelete` from a `ResourceOperations` interface instance.
623
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
624
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
625
+ *
600
626
  * Operation signature to delete a resource.
601
627
  * @template TResource The type of the resource.
602
628
  * @template Traits Traits to apply to the operation.
@@ -607,7 +633,10 @@ op ResourceDelete<
607
633
  > is StandardResourceOperations.ResourceDelete<TResource, Traits>;
608
634
 
609
635
  /**
610
- * DEPRECATED: Use LongRunningResourceDelete from the ResourceOperations interface.
636
+ * DEPRECATED: Use `LongRunningResourceDelete` from a `ResourceOperations` interface instance.
637
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
638
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
639
+ *
611
640
  * Long-running operation signature to delete a resource.
612
641
  * @template TResource The type of the resource.
613
642
  * @template Traits Traits to apply to the operation.
@@ -618,7 +647,10 @@ op LongRunningResourceDelete<
618
647
  > is StandardResourceOperations.LongRunningResourceDelete<TResource, Traits>;
619
648
 
620
649
  /**
621
- * DEPRECATED: Use ResourceList from the ResourceOperations interface.
650
+ * DEPRECATED: Use `ResourceList` from a `ResourceOperations` interface instance.
651
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
652
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
653
+ *
622
654
  * Operation signature to list resources in a paginated way.
623
655
  * @template TResource The type of the resource.
624
656
  * @template Traits Traits to apply to the operation.
@@ -629,7 +661,10 @@ op ResourceList<
629
661
  > is StandardResourceOperations.ResourceList<TResource, Traits>;
630
662
 
631
663
  /**
632
- * DEPRECATED: Use ResourceAction from the ResourceOperations interface.
664
+ * DEPRECATED: Use `ResourceAction` from a `ResourceOperations` interface instance.
665
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
666
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
667
+ *
633
668
  * Operation signature for a resource action.
634
669
  * @template TResource The type of the resource.
635
670
  * @template TParams Object describing the request parameters.
@@ -644,7 +679,10 @@ op ResourceAction<
644
679
  > is StandardResourceOperations.ResourceAction<TResource, TParams, TResponse, Traits>;
645
680
 
646
681
  /**
647
- * DEPRECATED: Use ResourceCollectionAction from the ResourceOperations interface.
682
+ * DEPRECATED: Use `ResourceCollectionAction` from a `ResourceOperations` interface instance.
683
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
684
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
685
+ *
648
686
  * Operation signature for an action that applies to a collection of resources.
649
687
  * @template TResource The type of the resource.
650
688
  * @template TParams Object describing the request parameters.
@@ -659,7 +697,10 @@ op ResourceCollectionAction<
659
697
  > is StandardResourceOperations.ResourceCollectionAction<TResource, TParams, TResponse, Traits>;
660
698
 
661
699
  /**
662
- * DEPRECATED: Use LongRunningResourceAction from the ResourceOperations interface.
700
+ * DEPRECATED: Use `LongRunningResourceAction` from a `ResourceOperations` interface instance.
701
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
702
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
703
+ *
663
704
  * Long-running operation signature for a resource action.
664
705
  * @template TResource The type of the resource.
665
706
  * @template TParams Object describing the request parameters.
@@ -682,7 +723,10 @@ op LongRunningResourceAction<
682
723
  >;
683
724
 
684
725
  /**
685
- * DEPRECATED: Use LongRunningResourceCollectionAction from the ResourceOperations interface.
726
+ * DEPRECATED: Use `LongRunningResourceCollectionAction` from a `ResourceOperations` interface instance.
727
+ * This can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.
728
+ * See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.
729
+ *
686
730
  * Long-running operation signature for an action that applies to a collection of resources.
687
731
  * @template TResource The type of the resource.
688
732
  * @template TParams Object describing the request parameters.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-core",
3
- "version": "0.35.0-dev.8",
3
+ "version": "0.35.0",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Core library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -42,20 +42,20 @@
42
42
  "!dist/test/**"
43
43
  ],
44
44
  "peerDependencies": {
45
- "@typespec/compiler": "~0.48.1 || >=0.49.0-dev <0.49.0",
46
- "@typespec/http": "~0.48.0 || >=0.49.0-dev <0.49.0",
47
- "@typespec/rest": "~0.48.0 || >=0.49.0-dev <0.49.0"
45
+ "@typespec/compiler": "~0.49.0",
46
+ "@typespec/http": "~0.49.0",
47
+ "@typespec/rest": "~0.49.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@typespec/compiler": "~0.48.1 || >=0.49.0-dev <0.49.0",
51
- "@typespec/http": "~0.48.0 || >=0.49.0-dev <0.49.0",
52
- "@typespec/rest": "~0.48.0 || >=0.49.0-dev <0.49.0",
53
- "@typespec/eslint-config-typespec": "~0.48.0 || >=0.49.0-dev <0.49.0",
54
- "@typespec/library-linter": "~0.48.0 || >=0.49.0-dev <0.49.0",
55
- "@typespec/eslint-plugin": "~0.48.0 || >=0.49.0-dev <0.49.0",
56
- "@typespec/openapi": "~0.48.0 || >=0.49.0-dev <0.49.0",
57
- "@typespec/tspd": "~0.46.0 || >=0.47.0-dev <0.47.0",
58
- "@typespec/versioning": "~0.48.0 || >=0.49.0-dev <0.49.0",
50
+ "@typespec/compiler": "~0.49.0",
51
+ "@typespec/http": "~0.49.0",
52
+ "@typespec/rest": "~0.49.0",
53
+ "@typespec/eslint-config-typespec": "~0.49.0",
54
+ "@typespec/library-linter": "~0.49.0",
55
+ "@typespec/eslint-plugin": "~0.49.0",
56
+ "@typespec/openapi": "~0.49.0",
57
+ "@typespec/tspd": "~0.46.0",
58
+ "@typespec/versioning": "~0.49.0",
59
59
  "@types/mocha": "~10.0.1",
60
60
  "@types/node": "~18.11.9",
61
61
  "eslint": "^8.49.0",
@@ -66,7 +66,6 @@
66
66
  "rimraf": "~5.0.1",
67
67
  "typescript": "~5.2.2"
68
68
  },
69
- "dependencies": {},
70
69
  "scripts": {
71
70
  "clean": "rimraf ./dist ./temp",
72
71
  "build": "tsc -p . && npm run lint-typespec-library",