Skip to content

Commit

Permalink
Deprecated code and update dependencies (#9379)
Browse files Browse the repository at this point in the history
* Removed dependencies

Removed swagger-validation-common dep;
Removed part of references from azure-js-dev-tools.

* [change1] Remove azure js dev tool (#9365)

* revert githubUtils.ts

* delete test file and fix some change about azure-js-dev-tools

* Removed unused codes and refactoring

* changing the order of code execution (#9374)

* Removed unused tests and refactor the code

* Update dependencies

* Refine dependencies and resolve vulnerabilities

* Update version to the first version

* Updated eslint config and tsconfig

* Added pipeline definitions

* Added flag to control publish

* Reference parameter

* Updated pipeline yml and added codeowner

---------

Co-authored-by: Tianen <[email protected]>
  • Loading branch information
raych1 and JackTn authored Nov 25, 2024
1 parent c333064 commit 91a6bfb
Show file tree
Hide file tree
Showing 201 changed files with 9,108 additions and 29,682 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
/tools/pipeline-witness/ @hallipr
/tools/sdk-ai-bots/ @raych1
/tools/sdk-testgen/ @lirenhe @tadelesh
/tools/spec-gen-sdk/ @raych1 @chidozieononiwu
/tools/test-proxy/ @scbedd @mikeharder @benbp
/tools/tsp-client/ @catalinaperalta
/tools/webhook-router/ @praveenkuttappan @weshaggard
Expand Down
3 changes: 3 additions & 0 deletions tools/spec-gen-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2024-11-14 - 0.1.0

- Initial Release
104 changes: 0 additions & 104 deletions tools/spec-gen-sdk/azure-pipelines.yml

This file was deleted.

73 changes: 73 additions & 0 deletions tools/spec-gen-sdk/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
trigger:
branches:
include:
- main
paths:
include:
- tools/spec-gen-sdk

pr:
branches:
include:
- main
paths:
include:
- tools/spec-gen-sdk

extends:
template: /eng/pipelines/templates/stages/archetype-sdk-publish-js.yml
parameters:
BuildStageName: InstallAndBuild
ArtifactName: drop
PackageJsonPath: $(Build.SourcesDirectory)/tools/spec-gen-sdk
BuildStages:
- stage: InstallAndBuild
variables:
- template: /eng/pipelines/templates/variables/globals.yml
- template: /eng/pipelines/templates/variables/image.yml
- name: NodeVersion
value: '20.x'
- name: VAR_ARTIFACT_NAME
value: 'drop'
- name: VAR_BUILD_ARTIFACT_STAGING_DIRECTORY
value: $(Build.ArtifactStagingDirectory)
jobs:
- job: Build_Linux
pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux
steps:
- task: NodeTool@0
inputs:
versionSpec: '$(NodeVersion)'
displayName: 'Install Node.js'

- bash: |
npm ci
displayName: 'npm ci'
workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk
- bash: |
npm run build-test
displayName: 'build and test'
workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk
- bash: |
npm pack
displayName: 'npm pack'
workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk
- bash: 'cp azure-tools-spec-gen-sdk-*.tgz $(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)'
displayName: 'copy to staging directory'
workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk

- pwsh: |
Get-ChildItem -Path $(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY) `
| ForEach-Object { Write-Host "npm install $($_.FullName)"; npm install $_.FullName }
displayName: Smoke test a package installation
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: '$(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)'
artifactName: '$(VAR_ARTIFACT_NAME)'
34 changes: 28 additions & 6 deletions tools/spec-gen-sdk/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
import globals from "globals";
import tseslint from "typescript-eslint";

import pluginJs from "@eslint/js";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";

/** @type {import('eslint').Linter.Config[]} */
export default [
{files: ["**/*.{js,mjs,cjs,ts}"]},
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
{languageOptions: { globals: globals.node }},
...tseslint.configs.recommended,
{
files: ["**/*.{js,mjs,cjs,ts}"],
languageOptions: {
globals: {
...globals.node
},
parser: tsParser,
parserOptions: {
ecmaVersion: "latest", // Use the latest ECMAScript features
sourceType: "module",
project: "./tsconfig.json", // Ensure this points to your tsconfig file
},
},
ignores: ["test/**/*", "jest.config.js", "eslint.config.mjs"],
plugins: {
"@typescript-eslint": tsPlugin,
},
rules: {
...pluginJs.configs.recommended.rules,
...tsPlugin.configs.recommended.rules,
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }]
},
},
];
46 changes: 0 additions & 46 deletions tools/spec-gen-sdk/integrationTest/clearGithubTestRepos.ts

This file was deleted.

26 changes: 0 additions & 26 deletions tools/spec-gen-sdk/integrationTest/fixtures/index.ts

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

34 changes: 0 additions & 34 deletions tools/spec-gen-sdk/integrationTest/fixtures/sdk-go-test/.gitignore

This file was deleted.

Loading

0 comments on commit 91a6bfb

Please sign in to comment.