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

[OpenAI] Precise Typechecking #31786

Merged
merged 13 commits into from
Nov 20, 2024
Merged

[OpenAI] Precise Typechecking #31786

merged 13 commits into from
Nov 20, 2024

Conversation

deyaaeldeen
Copy link
Member

@deyaaeldeen deyaaeldeen commented Nov 15, 2024

Behind the scene, TSHY rewrites tsconfig.json to build the source code of the library but it ignores tests and samples. This PR breaks the monolith tsconfig.json into three ones, one for building the source, one for the tests, and one for the samples. It utilizes Project References to create a TS project each. This setup makes sure type errors are adequately caught in each of those projects.

Additionally, the PR disables rolling up d.ts files and fixes a type error in tests.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

Copy link
Member

@minhanh-phan minhanh-phan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This work looks great, thank you 💯

@deyaaeldeen deyaaeldeen merged commit cd338ec into main Nov 20, 2024
18 checks passed
@deyaaeldeen deyaaeldeen deleted the openai/precise-typechecking branch November 20, 2024 22:54
deyaaeldeen added a commit that referenced this pull request Dec 4, 2024
Follows the same recipe in
#31786, more specifically:
- Enables typechecking tests and fix errors
- Fixes lint warnings in tests
- Removes unneeded tsconfig compiler options
- Uses modern ES2023 target when building samples and tests
- Fix npm commands for running tests to conform to how vitest tests are
configured

Live run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4385664&view=results
deyaaeldeen added a commit that referenced this pull request Dec 9, 2024
### Packages impacted by this PR
- @azure/api-management-custom-widgets-scaffolder
- @azure/api-management-custom-widgets-tools
- @azure/web-pubsub-client-protobuf
- @azure/web-pubsub-client
- @azure/web-pubsub-express
- @azure/web-pubsub 

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 10, 2024
### Packages impacted by this PR
- @azure/communication-alpha-ids
- @azure/communication-call-automation
- @Azure/communication-chat
- @azure/communication-common
- @azure/communication-email
- @azure/communication-identity
- @azure/communication-job-router
- @azure-rest/communication-job-router
- @azure-rest/communication-messages
- @azure/communication-phone-numbers
- @azure/communication-recepient-verification
- @azure/communication-rooms
- @azure/communication-short-codes
- @azure/communication-sms
- @azure/communication-tiering
- @azure/communication-toll-free-verification

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 11, 2024
### Packages impacted by this PR
- @azure/attestation

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 11, 2024
### Packages impacted by this PR
- @azure-rest/batch

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 11, 2024
### Packages impacted by this PR
- @azure-rest/ai-inference
- @azure-rest/ai-content-safety
- @azure-rest/ai-language-textauthoring
- @azure-rest/ai-document-intelligence
- @azure-rest/ai-document-translator
- @azure-rest/ai-vision-face
- @azure-rest/ai-vision-image-analysis
- @azure-rest/ai-translation-text
- @azure/ai-language-conversations
- @azure/ai-language-text
- @azure/ai-metrics-advisor
- @azure/ai-text-analytics

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)

---------

Co-authored-by: Jeremy Meng <[email protected]>
Co-authored-by: Harsha Nalluru <[email protected]>
deyaaeldeen added a commit that referenced this pull request Dec 11, 2024
### Packages impacted by this PR
- @azure-rest/maps-render
- @azure-rest/maps-route
- @azure-rest/maps-geolocation
- @azure-rest/maps-search

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
@deyaaeldeen deyaaeldeen mentioned this pull request Dec 11, 2024
3 tasks
deyaaeldeen added a commit that referenced this pull request Dec 11, 2024
### Packages impacted by this PR
- @azure-rest/ai-anomaly-detector

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 11, 2024
### Packages impacted by this PR
- @azure-rest/agrifood-farming

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
@deyaaeldeen deyaaeldeen mentioned this pull request Dec 11, 2024
3 tasks
deyaaeldeen added a commit that referenced this pull request Dec 11, 2024
### Packages impacted by this PR
- @azure/data-tables

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 11, 2024
### Packages impacted by this PR
- @azure/monitor-opentelemetry-exporter
- @azure/monitor-ingestion
- @azure/monitor-query

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 11, 2024
### Packages impacted by this PR
- @azure/synapse-spark
- @azure-rest/synapse-access-control
- @azure/synapse-managed-private-endpoints
- @azure/synapse-access-control
- @azure/synapse-artifacts
- @azure/synapse-monitoring

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 12, 2024
### Packages impacted by this PR
- @azure-rest/purview-catalog
- @azure-rest/purview-scanning
- @azure-rest/purview-workflow
- @azure-rest/purview-administration
- @azure-rest/purview-datamap
- @azure-rest/purview-sharing

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 12, 2024
### Packages impacted by this PR
- @azure-rest/health-insights-cancerprofiling
- @azure-rest/health-insights-clinicalmatching
- @azure-rest/health-insights-radiologyinsights
- @azure/arm-healthdataaiservices
- @azure-rest/health-deidentification

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 12, 2024
### Packages impacted by this PR
- @azure/search-documents

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 12, 2024
### Packages impacted by this PR
- @azure/eventgrid-namespaces
- @Azure/eventgrid
- @azure/evengrid-system-events

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 12, 2024
### Packages impacted by this PR
- @azure/arm-computefleet
- @azure/arm-computeschedule
- @azure/arm-connectedcache
- @azure/arm-devopsinfrastructure
- @azure/arm-edgezones
- @azure/arm-fabric
- @azure/arm-iotoperations
- @azure/arm-containerorchestratorruntime
- @azure/arm-mongocluster
- @azure/arm-neonpostgres
- @azure/arm-standbypool
- @azure/arm-terraform
- @azure/arm-trustedsigning

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 12, 2024
### Packages impacted by this PR
- @azure-rest/confidential-ledger
- @azure-rest/developer-devcenter
- @azure-rest/iot-device-update
- @azure-rest/defender-easm
- @azure-rest/load-testing

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
deyaaeldeen added a commit that referenced this pull request Dec 12, 2024
### Packages impacted by this PR
- @azure/container-registry
- @azure/digital-twins-core
- @azure/iot-modelrepository
- @azure/functions-authentication-events
- @azure/mixed-reality-authentication
- @azure/create-microsoft-playwright-testing
- @azure/quantum-jobs
- @azure/mixed-reality-remote-rendering
- @azure/template-dpg

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants