Skip to content

Commit

Permalink
Leverage Internal Feed for Further Dependencies (#2107)
Browse files Browse the repository at this point in the history
* switch from public to intl

* Dont wait for eslint to package

* Try to install eslint global

* Remove rimraf from gitignore, it doesnt make sense why its there?

this shouldnt make any folder called rimraf

* add rimraf globally

* Dont install -g as -g doesnt work on eslint /shrug

* Try installing -g and -l for separate components

* use save-dev

* Call npx to run eslint local as global since global cant resolve local packages well

* Tell NPX to use eslint that supports TS

* Move Lint and Upstream Verification onto OSX

This will make it faster since more of those agents are available and also free up more of the high demand windows agents that are needed to run the windows leg.

* Fix build

* Leverage npm ci to lock the version

This is to hopefully prevent E401 from trying to update new versions onto the base from an unauth'd machine

* Remove batch true

This is so multiple commits can run PRs at the same time. This has been turned on for a long time and I'm not sure why it was.

Thank you @MiYanni for helping figure this out, it was a weird an unexpected thing to dig through from the initial problem set.
  • Loading branch information
nagilson authored Jan 29, 2025
1 parent 6699da9 commit 56b1833
Show file tree
Hide file tree
Showing 9 changed files with 2,816 additions and 2,819 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,4 @@ install.*
vscode-dotnet-runtime-library/install scripts/dotnet-install.*
vscode-dotnet-runtime-extension/LICENSE.txt
vscode-dotnet-sdk-extension/LICENSE.txt
.vscode/launch.json
rimraf
.vscode/launch.json
13 changes: 6 additions & 7 deletions 1es-azure-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# URL: https://dev.azure.com/dnceng/internal/_build?definitionId=656

trigger:
batch: true
branches:
include:
- main
Expand Down Expand Up @@ -86,16 +85,16 @@ extends:
- template: pipeline-templates/upstream-verify.yaml@self
parameters:
pool:
name: NetCore1ESPool-Internal
image: 1es-windows-2022
os: windows
name: Azure Pipelines
image: macOS-latest
os: macOS
useOneEngineeringPool: true
- template: pipeline-templates/lint.yaml@self
parameters:
pool:
name: NetCore1ESPool-Internal
image: 1es-windows-2022
os: windows
name: Azure Pipelines
image: macOS-latest
os: macOS
useOneEngineeringPool: true
- template: pipeline-templates/package-vsix.yaml@self
parameters:
Expand Down
9 changes: 4 additions & 5 deletions 1pr-azure-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# URL: https://dev.azure.com/dnceng-public/public/_build?definitionId=60

trigger:
batch: true
branches:
include:
- main
Expand Down Expand Up @@ -54,14 +53,14 @@ stages:
- template: pipeline-templates/upstream-verify.yaml
parameters:
pool:
vmImage: windows-latest
os: windows
vmImage: macOS-latest
os: macOS
useOneEngineeringPool: false
- template: pipeline-templates/lint.yaml
parameters:
pool:
vmImage: windows-latest
os: windows
vmImage: macOS-latest
os: macOS
useOneEngineeringPool: false
- template: pipeline-templates/package-vsix.yaml
parameters:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "Microsoft Corporation",
"scripts": {
"compile-all": "build.cmd",
"lint": "eslint -c .eslintrc.js --ext=.ts vscode-dotnet-runtime-library/src/**/*.ts vscode-dotnet-runtime-extension/src/**/*.ts --ignore-pattern \"**/test/\" --fix"
"lint": "npx eslint@^8.57.0 -c .eslintrc.js --ext=.ts vscode-dotnet-runtime-library/src/**/*.ts vscode-dotnet-runtime-extension/src/**/*.ts --ignore-pattern \"**/test/\" --fix"
},
"dependencies": {
"@typescript-eslint/eslint-plugin-tslint": "^7.0.2",
Expand All @@ -33,4 +33,4 @@
"eslint-plugin-prettier": "^5.2.1",
"rimraf": "3.0.2"
}
}
}
5 changes: 3 additions & 2 deletions pipeline-templates/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ jobs:
displayName: '🧶 ESLint'
steps:
- template: install-node.yaml
- script: build.cmd
- script: ./build.sh
displayName: 🐧 Build To Install Deps
- bash: |
npm install eslint@^8.57.0 @typescript-eslint/parser@^8.0.0 @typescript-eslint/eslint-plugin@^8.0.0 --reg https://registry.npmjs.org/ --save-dev --verbose
npm ci eslint@^8.57.0 @typescript-eslint/parser@^8.0.0 @typescript-eslint/eslint-plugin@^8.0.0 --save-dev
npm run lint
displayName: 🧶 Run Lint
5 changes: 2 additions & 3 deletions pipeline-templates/package-vsix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
displayName: '📦 Package and Publish'
dependsOn:
- ${{ parameters.pool.os }}_Build
- ESLint
condition: succeeded()
strategy:
matrix:
Expand Down Expand Up @@ -47,8 +46,8 @@ jobs:
parameters:
SignType: ${{ parameters.SignType }}
- bash: |
npm install rimraf --reg https://registry.npmjs.org/ --verbose
npm install @vscode/vsce@latest -g --reg https://registry.npmjs.org/ --verbose
npm i -g rimraf
npm i -g @vscode/vsce
vsce package -o $(package-name)-$(GetVersion.version).vsix --ignoreFile ../.vscodeignore --yarn
cp $(package-name)-$(GetVersion.version).vsix ../packages/$(package-name)-$(GetVersion.version).vsix
displayName: 📦 Package Artifact
Expand Down
2 changes: 1 addition & 1 deletion pipeline-templates/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
scriptLocation: 'inlineScript'
workingDirectory: '$(System.ArtifactsDirectory)'
inlineScript: |
npm install @vscode/vsce@latest -g --reg https://registry.npmjs.org/ --verbose
npm i -g --verbose @vscode/vsce
$basePublishArgs = , "publish"
$basePublishArgs += '--azure-credential'
$basePublishArgs += '--packagePath'
Expand Down
4 changes: 2 additions & 2 deletions vscode-dotnet-sdk-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"test": "npm run compile --silent && node ./dist/test/functional/runTest.js",
"clean": "rimraf dist",
"compile-all": "cd ../vscode-dotnet-runtime-library && npm install && npm run compile && cd ../vscode-dotnet-sdk-extension && npm install && npm run compile",
"lint": "eslint -c .eslintrc.js --ext=.ts vscode-dotnet-runtime-library/src/**/*.ts vscode-dotnet-runtime-extension/src/**/*.ts --ignore-pattern \"**/test/\" --fix",
"lint": "npx eslint@^8.57.0 -c .eslintrc.js --ext=.ts vscode-dotnet-runtime-library/src/**/*.ts vscode-dotnet-runtime-extension/src/**/*.ts --ignore-pattern \"**/test/\" --fix",
"webpack": "webpack --mode development"
},
"dependencies": {
Expand Down Expand Up @@ -122,4 +122,4 @@
"publisherId": "d05e23de-3974-4ff0-8d47-23ee77830092",
"isPreReleaseVersion": false
}
}
}
Loading

0 comments on commit 56b1833

Please sign in to comment.