File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
tree-sitter-dscexpression Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change
1
+ ; We generally want to save install/update commands
2
+ save = true
3
+ ; We use a public Azure Artifacts mirror
1
4
registry = https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/npm/registry/
2
-
3
5
always-auth = true
6
+ ; But we don't want references to it in the lockfile
7
+ omit-lockfile-registry-resolved = true
Original file line number Diff line number Diff line change 1
1
# Copyright (c) Microsoft Corporation.
2
2
# Licensed under the MIT License.
3
3
4
- # check if tools are installed
4
+ param (
5
+ [switch ]$UpdatePackages
6
+ )
5
7
6
8
function Invoke-NativeCommand ($cmd ) {
7
9
Invoke-Expression $cmd
@@ -32,5 +34,18 @@ if ($LASTEXITCODE -ne 0) {
32
34
npm ci tree- sitter- cli -- omit= optional
33
35
}
34
36
37
+ if ($UpdatePackages ) {
38
+ if (! $IsWindows ) {
39
+ throw " This switch only works on Windows"
40
+ }
41
+
42
+ rm ./ package- lock.json
43
+ rm - r ./ node_modules
44
+ npm cache clean -- force
45
+ npm logout
46
+ vsts- npm- auth - config .npmrc -F - V
47
+ npm install -- force -- verbose
48
+ }
49
+
35
50
Invoke-NativeCommand ' npx tree-sitter generate --build'
36
51
Invoke-NativeCommand ' npx tree-sitter test'
You can’t perform that action at this time.
0 commit comments