Skip to content

Commit 91a6bfb

Browse files
raych1JackTn
andauthored
Deprecated code and update dependencies (#9379)
* 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 <v-tianxi@microsoft.com>
1 parent c333064 commit 91a6bfb

File tree

201 files changed

+9108
-29682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+9108
-29682
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
/tools/pipeline-witness/ @hallipr
4545
/tools/sdk-ai-bots/ @raych1
4646
/tools/sdk-testgen/ @lirenhe @tadelesh
47+
/tools/spec-gen-sdk/ @raych1 @chidozieononiwu
4748
/tools/test-proxy/ @scbedd @mikeharder @benbp
4849
/tools/tsp-client/ @catalinaperalta
4950
/tools/webhook-router/ @praveenkuttappan @weshaggard

tools/spec-gen-sdk/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 2024-11-14 - 0.1.0
2+
3+
- Initial Release

tools/spec-gen-sdk/azure-pipelines.yml

-104
This file was deleted.

tools/spec-gen-sdk/ci.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
trigger:
2+
branches:
3+
include:
4+
- main
5+
paths:
6+
include:
7+
- tools/spec-gen-sdk
8+
9+
pr:
10+
branches:
11+
include:
12+
- main
13+
paths:
14+
include:
15+
- tools/spec-gen-sdk
16+
17+
extends:
18+
template: /eng/pipelines/templates/stages/archetype-sdk-publish-js.yml
19+
parameters:
20+
BuildStageName: InstallAndBuild
21+
ArtifactName: drop
22+
PackageJsonPath: $(Build.SourcesDirectory)/tools/spec-gen-sdk
23+
BuildStages:
24+
- stage: InstallAndBuild
25+
variables:
26+
- template: /eng/pipelines/templates/variables/globals.yml
27+
- template: /eng/pipelines/templates/variables/image.yml
28+
- name: NodeVersion
29+
value: '20.x'
30+
- name: VAR_ARTIFACT_NAME
31+
value: 'drop'
32+
- name: VAR_BUILD_ARTIFACT_STAGING_DIRECTORY
33+
value: $(Build.ArtifactStagingDirectory)
34+
jobs:
35+
- job: Build_Linux
36+
pool:
37+
name: $(LINUXPOOL)
38+
image: $(LINUXVMIMAGE)
39+
os: linux
40+
steps:
41+
- task: NodeTool@0
42+
inputs:
43+
versionSpec: '$(NodeVersion)'
44+
displayName: 'Install Node.js'
45+
46+
- bash: |
47+
npm ci
48+
displayName: 'npm ci'
49+
workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk
50+
51+
- bash: |
52+
npm run build-test
53+
displayName: 'build and test'
54+
workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk
55+
56+
- bash: |
57+
npm pack
58+
displayName: 'npm pack'
59+
workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk
60+
61+
- bash: 'cp azure-tools-spec-gen-sdk-*.tgz $(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)'
62+
displayName: 'copy to staging directory'
63+
workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk
64+
65+
- pwsh: |
66+
Get-ChildItem -Path $(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY) `
67+
| ForEach-Object { Write-Host "npm install $($_.FullName)"; npm install $_.FullName }
68+
displayName: Smoke test a package installation
69+
70+
- task: 1ES.PublishPipelineArtifact@1
71+
inputs:
72+
targetPath: '$(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)'
73+
artifactName: '$(VAR_ARTIFACT_NAME)'

tools/spec-gen-sdk/eslint.config.mjs

+28-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,32 @@
11
import globals from "globals";
2-
import tseslint from "typescript-eslint";
3-
2+
import pluginJs from "@eslint/js";
3+
import tsPlugin from "@typescript-eslint/eslint-plugin";
4+
import tsParser from "@typescript-eslint/parser";
45

6+
/** @type {import('eslint').Linter.Config[]} */
57
export default [
6-
{files: ["**/*.{js,mjs,cjs,ts}"]},
7-
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
8-
{languageOptions: { globals: globals.node }},
9-
...tseslint.configs.recommended,
8+
{
9+
files: ["**/*.{js,mjs,cjs,ts}"],
10+
languageOptions: {
11+
globals: {
12+
...globals.node
13+
},
14+
parser: tsParser,
15+
parserOptions: {
16+
ecmaVersion: "latest", // Use the latest ECMAScript features
17+
sourceType: "module",
18+
project: "./tsconfig.json", // Ensure this points to your tsconfig file
19+
},
20+
},
21+
ignores: ["test/**/*", "jest.config.js", "eslint.config.mjs"],
22+
plugins: {
23+
"@typescript-eslint": tsPlugin,
24+
},
25+
rules: {
26+
...pluginJs.configs.recommended.rules,
27+
...tsPlugin.configs.recommended.rules,
28+
"@typescript-eslint/ban-ts-comment": "error",
29+
"@typescript-eslint/no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }]
30+
},
31+
},
1032
];

tools/spec-gen-sdk/integrationTest/clearGithubTestRepos.ts

-46
This file was deleted.

tools/spec-gen-sdk/integrationTest/fixtures/index.ts

-26
This file was deleted.

tools/spec-gen-sdk/integrationTest/fixtures/schm-arm-test/.gitignore

-1
This file was deleted.

tools/spec-gen-sdk/integrationTest/fixtures/schm-arm-test/schemas/common/definitions.json

Whitespace-only changes.

tools/spec-gen-sdk/integrationTest/fixtures/schm-arm-test/swagger_to_sdk_config.json

-18
This file was deleted.

tools/spec-gen-sdk/integrationTest/fixtures/sdk-go-test/.gitignore

-34
This file was deleted.

0 commit comments

Comments
 (0)