Skip to content

Commit

Permalink
Bump dependencies - Sep 2024 (#1534)
Browse files Browse the repository at this point in the history
Notable: 
- Typescript 5.6: iterator functions  and more
- typescript-eslint 8: new rules, breaking change to some other, found a
few bugs/test not actually testing
- eslint 9: new rules
- removed deprecation/deprecation plugin as typescript eslint has rule
for it now(and updated) many places where it wasn't reporting correctly
  • Loading branch information
timotheeguerin authored Sep 13, 2024
1 parent 81d331f commit 1a3ff89
Show file tree
Hide file tree
Showing 41 changed files with 5,326 additions and 5,175 deletions.
14 changes: 14 additions & 0 deletions .chronus/changes/upgrade-deps-sep-2024-2024-8-13-1-4-48.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: dependencies
packages:
- "@azure-tools/typespec-autorest-canonical"
- "@azure-tools/typespec-autorest"
- "@azure-tools/typespec-azure-core"
- "@azure-tools/typespec-azure-portal-core"
- "@azure-tools/typespec-azure-resource-manager"
- "@azure-tools/typespec-azure-rulesets"
- "@azure-tools/typespec-client-generator-core"
---

Bump dependencies
2 changes: 1 addition & 1 deletion core
Submodule core updated 89 files
+27 −0 .chronus/changes/upgrade-deps-sep-2024-2024-8-13-0-37-48.md
+4 −0 api-extractor.base.json
+19 −12 eslint.config.js
+21 −21 package.json
+5 −5 packages/best-practices/package.json
+7 −7 packages/bundle-uploader/package.json
+9 −9 packages/bundler/package.json
+1 −10 packages/bundler/src/bundler.ts
+9 −9 packages/compiler/package.json
+1 −1 packages/compiler/src/core/checker.ts
+0 −1 packages/compiler/src/core/cli/actions/compile/compile.ts
+6 −3 packages/compiler/src/core/cli/actions/compile/watch.ts
+0 −1 packages/compiler/src/core/helpers/index.ts
+0 −2 packages/compiler/src/core/index.ts
+1 −1 packages/compiler/src/core/library.ts
+0 −1 packages/compiler/src/core/logger/support-hyperlinks.ts
+1 −1 packages/compiler/src/core/path-utils.ts
+4 −4 packages/compiler/src/core/program.ts
+5 −5 packages/compiler/src/core/projector.ts
+0 −1 packages/compiler/src/emitter-framework/type-emitter.ts
+1 −3 packages/compiler/src/lib/decorators.ts
+1 −1 packages/compiler/src/lib/service.ts
+0 −1 packages/compiler/src/lib/tsp-index.ts
+0 −2 packages/compiler/src/server/server.ts
+6 −6 packages/compiler/src/server/serverlib.ts
+0 −1 packages/compiler/src/utils/misc.ts
+0 −2 packages/compiler/test/checker/clone-type.test.ts
+0 −3 packages/compiler/test/checker/model.test.ts
+1 −3 packages/compiler/test/checker/references.test.ts
+0 −1 packages/compiler/test/helpers/string-template-utils.test.ts
+0 −2 packages/compiler/test/projection/projector-identity.test.ts
+11 −11 packages/eslint-plugin-typespec/package.json
+0 −1 packages/eslint-plugin-typespec/src/rules/call-decorator.ts
+5 −4 packages/eslint-plugin-typespec/test/rules/call-decorator.test.ts
+16 −16 packages/html-program-viewer/package.json
+0 −4 packages/http-client-csharp/emitter/test/Unit/model-type.test.ts
+0 −1 packages/http-client-csharp/emitter/test/Unit/property-type.test.ts
+0 −1 packages/http-client-csharp/emitter/test/Unit/scalar.test.ts
+8 −8 packages/http-server-csharp/package.json
+2 −2 packages/http-server-csharp/src/interfaces.ts
+7 −7 packages/http-server-csharp/src/service.ts
+3 −3 packages/http-server-javascript/package.json
+1 −0 packages/http-server-javascript/src/http/server/index.ts
+5 −5 packages/http/package.json
+3 −3 packages/http/src/decorators.ts
+1 −2 packages/http/src/types.ts
+0 −2 packages/http/test/http-decorators.test.ts
+8 −8 packages/internal-build-utils/package.json
+6 −6 packages/json-schema/package.json
+2 −3 packages/json-schema/src/json-schema-emitter.ts
+5 −5 packages/library-linter/package.json
+7 −7 packages/monarch/package.json
+5 −5 packages/openapi/package.json
+2 −2 packages/openapi/src/decorators.ts
+7 −7 packages/openapi3/package.json
+3 −1 packages/openapi3/src/openapi.ts
+11 −33 packages/openapi3/src/schema-emitter.ts
+17 −20 packages/openapi3/test/output-file.test.ts
+2 −2 packages/openapi3/test/tsp-openapi3/utils/spec-snapshot-testing.ts
+12 −12 packages/playground-website/package.json
+18 −18 packages/playground/package.json
+1 −1 packages/playground/src/react/settings/linter-form.tsx
+1 −1 packages/playground/src/services.ts
+1 −0 packages/playground/tsconfig.json
+2 −2 packages/prettier-plugin-typespec/package.json
+6 −6 packages/protobuf/package.json
+1 −1 packages/protobuf/src/transform/index.ts
+14 −14 packages/react-components/package.json
+5 −5 packages/rest/package.json
+5 −5 packages/samples/package.json
+0 −2 packages/samples/specs/rest-metadata-emitter/rest-metadata-emitter-sample.ts
+2 −2 packages/samples/src/sample-snapshot-testing.ts
+2 −2 packages/spec/package.json
+2 −2 packages/tmlanguage-generator/package.json
+10 −10 packages/tspd/package.json
+2 −2 packages/tspd/src/ref-doc/extractor.ts
+9 −9 packages/typespec-vscode/package.json
+1 −1 packages/typespec-vscode/src/typespec-log-output-channel.ts
+6 −6 packages/versioning/package.json
+1 −1 packages/versioning/src/projection.ts
+2 −2 packages/versioning/src/validate.ts
+1 −1 packages/versioning/src/versioning-timeline.ts
+1 −7 packages/versioning/test/versioning.test.ts
+1 −1 packages/website/docusaurus.config.ts
+18 −18 packages/website/package.json
+1 −0 packages/website/src/theme/prism-include-languages.ts
+0 −7 packages/xml/.eslintrc.cjs
+5 −5 packages/xml/package.json
+3,757 −3,560 pnpm-lock.yaml
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@
"sync-labels": "tsx ./core/eng/common/scripts/labels/sync-labels.ts --config ./eng/config/labels.ts"
},
"devDependencies": {
"@chronus/chronus": "^0.11.0",
"@chronus/github": "^0.4.1",
"@eslint/js": "^8.57.0",
"@chronus/chronus": "^0.12.1",
"@chronus/github": "^0.4.3",
"@eslint/js": "^9.10.0",
"@pnpm/find-workspace-packages": "^6.0.9",
"@types/node": "~18.11.19",
"@typescript-eslint/parser": "^7.17.0",
"@typescript-eslint/utils": "^7.17.0",
"@types/node": "~22.5.4",
"@typescript-eslint/parser": "^8.5.0",
"@typescript-eslint/utils": "^8.5.0",
"c8": "^10.1.2",
"cspell": "^8.12.1",
"eslint": "^8.57.0",
"cspell": "^8.14.2",
"eslint": "^9.10.0",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-unicorn": "^54.0.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-unicorn": "^55.0.0",
"eslint-plugin-vitest": "^0.5.4",
"prettier": "~3.3.3",
"prettier-plugin-organize-imports": "~4.0.0",
"rimraf": "~6.0.1",
"syncpack": "^12.3.3",
"tsx": "^4.16.2",
"typescript": "~5.5.4",
"typescript-eslint": "^7.17.0",
"vitest": "^2.0.4"
"syncpack": "^13.0.0",
"tsx": "^4.19.1",
"typescript": "~5.6.2",
"typescript-eslint": "^8.5.0",
"vitest": "^2.1.0"
},
"syncpack": {
"dependencyTypes": [
Expand All @@ -67,7 +67,7 @@
]
},
"dependencies": {
"picocolors": "~1.0.1"
"picocolors": "~1.1.0"
},
"pnpm": {
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"devDependencies": {
"@typespec/compiler": "workspace:~",
"dotenv": "~16.4.5",
"typescript": "~5.5.4"
"typescript": "~5.6.2"
}
}
10 changes: 5 additions & 5 deletions packages/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
"@typespec/versioning": "workspace:~"
},
"devDependencies": {
"@types/node": "~18.11.19",
"@types/node": "~22.5.4",
"@typespec/internal-build-utils": "workspace:~",
"@typespec/samples": "workspace:~",
"@vitest/coverage-v8": "^2.0.4",
"@vitest/ui": "^2.0.4",
"@vitest/coverage-v8": "^2.1.0",
"@vitest/ui": "^2.1.0",
"autorest": "~3.7.1",
"cross-env": "~7.0.3",
"rimraf": "~6.0.1",
"typescript": "~5.5.4",
"vitest": "^2.0.4"
"typescript": "~5.6.2",
"vitest": "^2.1.0"
}
}
10 changes: 5 additions & 5 deletions packages/typespec-autorest-canonical/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@
"@azure-tools/typespec-azure-core": "workspace:~",
"@azure-tools/typespec-azure-resource-manager": "workspace:~",
"@azure-tools/typespec-client-generator-core": "workspace:~",
"@types/node": "~18.11.19",
"@types/node": "~22.5.4",
"@typespec/compiler": "workspace:~",
"@typespec/http": "workspace:~",
"@typespec/library-linter": "workspace:~",
"@typespec/openapi": "workspace:~",
"@typespec/rest": "workspace:~",
"@typespec/tspd": "workspace:~",
"@typespec/versioning": "workspace:~",
"@vitest/coverage-v8": "^2.0.4",
"@vitest/ui": "^2.0.4",
"@vitest/coverage-v8": "^2.1.0",
"@vitest/ui": "^2.1.0",
"c8": "^10.1.2",
"change-case": "~5.4.4",
"rimraf": "~6.0.1",
"typescript": "~5.5.4",
"vitest": "^2.0.4"
"typescript": "~5.6.2",
"vitest": "^2.1.0"
}
}
10 changes: 5 additions & 5 deletions packages/typespec-autorest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@azure-tools/typespec-azure-core": "workspace:~",
"@azure-tools/typespec-azure-resource-manager": "workspace:~",
"@azure-tools/typespec-client-generator-core": "workspace:~",
"@types/node": "~18.11.19",
"@types/node": "~22.5.4",
"@typespec/compiler": "workspace:~",
"@typespec/http": "workspace:~",
"@typespec/json-schema": "workspace:~",
Expand All @@ -77,12 +77,12 @@
"@typespec/rest": "workspace:~",
"@typespec/tspd": "workspace:~",
"@typespec/versioning": "workspace:~",
"@vitest/coverage-v8": "^2.0.4",
"@vitest/ui": "^2.0.4",
"@vitest/coverage-v8": "^2.1.0",
"@vitest/ui": "^2.1.0",
"c8": "^10.1.2",
"change-case": "~5.4.4",
"rimraf": "~6.0.1",
"typescript": "~5.5.4",
"vitest": "^2.0.4"
"typescript": "~5.6.2",
"vitest": "^2.1.0"
}
}
4 changes: 3 additions & 1 deletion packages/typespec-autorest/src/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ export async function getOpenAPIForService(
continue;
}

// eslint-disable-next-line @typescript-eslint/no-deprecated
if (httpOpParam.type === "header" && isContentTypeHeader(program, httpOpParam.param)) {
continue;
}
Expand Down Expand Up @@ -1353,6 +1354,7 @@ export async function getOpenAPIForService(
if (param.explode) {
return "multi";
}
// eslint-disable-next-line @typescript-eslint/no-deprecated
let collectionFormat = param.format;
if (collectionFormat && !["csv", "ssv", "tsv", "pipes", "multi"].includes(collectionFormat)) {
collectionFormat = undefined;
Expand Down Expand Up @@ -1659,7 +1661,7 @@ export async function getOpenAPIForService(
reportUnsupportedUnion("empty");
return {};
}
const type = getEnumMemberType(e.members.values().next().value);
const type = getEnumMemberType(e.members.values().next().value!);
for (const option of e.members.values()) {
if (type !== getEnumMemberType(option)) {
reportUnsupportedUnion();
Expand Down
1 change: 0 additions & 1 deletion packages/typespec-autorest/test/parameters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ describe("header parameters", () => {
`,
{ "omit-unreachable-types": true }
);
``;

expectDiagnostics(ignoreUseStandardOps(diagnostics), [
{
Expand Down
10 changes: 5 additions & 5 deletions packages/typespec-azure-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@
"@typespec/rest": "workspace:~"
},
"devDependencies": {
"@types/node": "~18.11.19",
"@types/node": "~22.5.4",
"@typespec/compiler": "workspace:~",
"@typespec/http": "workspace:~",
"@typespec/library-linter": "workspace:~",
"@typespec/openapi": "workspace:~",
"@typespec/rest": "workspace:~",
"@typespec/tspd": "workspace:~",
"@typespec/versioning": "workspace:~",
"@vitest/coverage-v8": "^2.0.4",
"@vitest/ui": "^2.0.4",
"@vitest/coverage-v8": "^2.1.0",
"@vitest/ui": "^2.1.0",
"c8": "^10.1.2",
"rimraf": "~6.0.1",
"typescript": "~5.5.4",
"vitest": "^2.0.4"
"typescript": "~5.6.2",
"vitest": "^2.1.0"
}
}
4 changes: 2 additions & 2 deletions packages/typespec-azure-core/src/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@ export function getPagedResult(
const items = _getItems(program, entity);
if (items !== undefined) {
metadata.itemsProperty = items.property;
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
metadata.itemsPath = items.path;
metadata.itemsSegments = items.segments;
}
const nextLink = _getNextLink(program, entity);
if (nextLink !== undefined) {
metadata.nextLinkProperty = nextLink.property;
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
metadata.nextLinkPath = nextLink.path;
metadata.nextLinkSegments = nextLink.segments;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const nonBreakingVersioningRule = createRule({

if (
getMadeOptionalOn(context.program, modelProperty) !== undefined &&
// eslint-disable-next-line @typescript-eslint/no-deprecated
modelProperty.default === undefined
) {
context.reportDiagnostic({
Expand Down
1 change: 0 additions & 1 deletion packages/typespec-azure-core/src/rules/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export function getNamespaceName(program: Program, type: DeclarableType | undefi
if (type === undefined) {
return "";
}
getNamespaceFullName;
return getNamespaceFullName(type);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/typespec-azure-core/src/traits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export const $traitAdded: TraitAddedDecorator = (
}

// Invoke the decorator on the sole envelope property
const envelopeProperty = target.properties.values().next().value;
const envelopeProperty = target.properties.values().next().value!;
context.call($traitAdded, envelopeProperty, addedVersion);

// Manually push the decorator onto the property so that it's copyable when
Expand Down
4 changes: 0 additions & 4 deletions packages/typespec-azure-core/test/decorators.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ describe("typespec-azure-core: decorators", () => {
`);
const actual = getPagedResult(runner.program, Foo as Model);
assert(actual?.itemsProperty?.name === "foos");
// eslint-disable-next-line deprecation/deprecation
assert(actual?.itemsPath === "foos");
deepStrictEqual(actual?.itemsSegments, ["foos"]);
assert(actual?.nextLinkProperty?.name === "nextThing");
// eslint-disable-next-line deprecation/deprecation
assert(actual?.nextLinkPath === "nextThing");
deepStrictEqual(actual?.nextLinkSegments, ["nextThing"]);
});
Expand All @@ -78,11 +76,9 @@ describe("typespec-azure-core: decorators", () => {
`);
const actual = getPagedResult(runner.program, Foo as Model);
assert(actual?.itemsProperty?.name === "things");
// eslint-disable-next-line deprecation/deprecation
assert(actual?.itemsPath === "boo.things");
deepStrictEqual(actual?.itemsSegments, ["boo", "things"]);
assert(actual?.nextLinkProperty?.name === "next");
// eslint-disable-next-line deprecation/deprecation
assert(actual?.nextLinkPath === "boo.doo.next");
deepStrictEqual(actual?.nextLinkSegments, ["boo", "doo", "next"]);
});
Expand Down
16 changes: 8 additions & 8 deletions packages/typespec-azure-playground-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@azure-tools/typespec-azure-resource-manager": "workspace:~",
"@azure-tools/typespec-azure-rulesets": "workspace:~",
"@azure-tools/typespec-client-generator-core": "workspace:~",
"@emotion/react": "^11.13.0",
"@emotion/react": "^11.13.3",
"@typespec/compiler": "workspace:~",
"@typespec/http": "workspace:~",
"@typespec/openapi": "workspace:~",
Expand All @@ -67,19 +67,19 @@
"es-module-shims": "~1.10.0",
"react": "~18.3.1",
"react-dom": "~18.3.1",
"vite": "^5.3.4"
"vite": "^5.4.4"
},
"devDependencies": {
"@playwright/test": "^1.45.3",
"@types/node": "~18.11.19",
"@playwright/test": "^1.47.0",
"@types/node": "~22.5.4",
"@types/react-dom": "~18.3.0",
"@typespec/bundler": "workspace:~",
"@typespec/playground": "workspace:~",
"@vitest/coverage-v8": "^2.0.4",
"@vitest/ui": "^2.0.4",
"@vitest/coverage-v8": "^2.1.0",
"@vitest/ui": "^2.1.0",
"cross-env": "~7.0.3",
"rimraf": "~6.0.1",
"typescript": "~5.5.4",
"vitest": "^2.0.4"
"typescript": "~5.6.2",
"vitest": "^2.1.0"
}
}
10 changes: 5 additions & 5 deletions packages/typespec-azure-portal-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@
"@azure-tools/typespec-azure-core": "workspace:~",
"@azure-tools/typespec-azure-resource-manager": "workspace:~",
"@azure-tools/typespec-client-generator-core": "workspace:~",
"@types/node": "~18.11.19",
"@types/node": "~22.5.4",
"@typespec/compiler": "workspace:~",
"@typespec/http": "workspace:~",
"@typespec/library-linter": "workspace:~",
"@typespec/openapi": "workspace:~",
"@typespec/rest": "workspace:~",
"@typespec/tspd": "workspace:~",
"@typespec/versioning": "workspace:~",
"@vitest/coverage-v8": "^2.0.4",
"@vitest/ui": "^2.0.4",
"@vitest/coverage-v8": "^2.1.0",
"@vitest/ui": "^2.1.0",
"c8": "^10.1.2",
"source-map-support": "~0.5.21",
"typescript": "~5.5.4",
"vitest": "^2.0.4"
"typescript": "~5.6.2",
"vitest": "^2.1.0"
},
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion packages/typespec-azure-portal-core/src/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function $promotion(context: DecoratorContext, target: Model, options: Mo
}
} else if (target.namespace) {
const service = getService(program, target.namespace);
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
if (service?.version && currentApiVersion !== service.version) {
reportDiagnostic(program, {
code: "invalid-apiversion",
Expand Down
10 changes: 5 additions & 5 deletions packages/typespec-azure-resource-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},
"devDependencies": {
"@azure-tools/typespec-azure-core": "workspace:~",
"@types/node": "~18.11.19",
"@types/node": "~22.5.4",
"@types/pluralize": "^0.0.33",
"@typespec/compiler": "workspace:~",
"@typespec/http": "workspace:~",
Expand All @@ -75,11 +75,11 @@
"@typespec/rest": "workspace:~",
"@typespec/tspd": "workspace:~",
"@typespec/versioning": "workspace:~",
"@vitest/coverage-v8": "^2.0.4",
"@vitest/ui": "^2.0.4",
"@vitest/coverage-v8": "^2.1.0",
"@vitest/ui": "^2.1.0",
"c8": "^10.1.2",
"rimraf": "~6.0.1",
"typescript": "~5.5.4",
"vitest": "^2.0.4"
"typescript": "~5.6.2",
"vitest": "^2.1.0"
}
}
10 changes: 5 additions & 5 deletions packages/typespec-azure-rulesets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
"@azure-tools/typespec-azure-core": "workspace:~",
"@azure-tools/typespec-azure-resource-manager": "workspace:~",
"@azure-tools/typespec-client-generator-core": "workspace:~",
"@types/node": "~18.11.19",
"@types/node": "~22.5.4",
"@typespec/compiler": "workspace:~",
"@typespec/tspd": "workspace:~",
"@vitest/coverage-v8": "^2.0.4",
"@vitest/ui": "^2.0.4",
"@vitest/coverage-v8": "^2.1.0",
"@vitest/ui": "^2.1.0",
"c8": "^10.1.2",
"change-case": "~5.4.4",
"rimraf": "~6.0.1",
"typescript": "~5.5.4",
"vitest": "^2.0.4"
"typescript": "~5.6.2",
"vitest": "^2.1.0"
}
}
Loading

0 comments on commit 1a3ff89

Please sign in to comment.