Skip to content

Commit 7791b03

Browse files
authored
Support npm operations using native npm client with .npmrc via --run-native flag (#2952)
* New npm native implementation
1 parent c8c6146 commit 7791b03

File tree

19 files changed

+248
-18
lines changed

19 files changed

+248
-18
lines changed

.github/workflows/accessTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
uses: jfrog/.github/actions/install-local-artifactory@main
3838
with:
3939
RTLIC: ${{ secrets.RTLIC }}
40+
VERSION: 7.104.15
4041

4142
- name: Get ID Token and Exchange Token
4243
shell: bash

.github/workflows/artifactoryTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
uses: jfrog/.github/actions/install-local-artifactory@main
3838
with:
3939
RTLIC: ${{ secrets.RTLIC }}
40+
VERSION: 7.104.15
4041

4142
- name: Run Artifactory tests
4243
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.artifactory --jfrog.url=http://127.0.0.1:8082 --jfrog.adminToken=${{ env.JFROG_TESTS_LOCAL_ACCESS_TOKEN }}

.github/workflows/gradleTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
uses: jfrog/.github/actions/install-local-artifactory@main
4949
with:
5050
RTLIC: ${{ secrets.RTLIC }}
51+
VERSION: 7.104.15
5152

5253
- name: Run Gradle tests
5354
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.gradle

.github/workflows/mavenTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
uses: jfrog/.github/actions/install-local-artifactory@main
4141
with:
4242
RTLIC: ${{ secrets.RTLIC }}
43+
VERSION: 7.104.15
4344

4445
- name: Run Maven tests
4546
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.maven

.github/workflows/npmTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
uses: jfrog/.github/actions/install-local-artifactory@main
4040
with:
4141
RTLIC: ${{ secrets.RTLIC }}
42+
VERSION: 7.104.15
4243

4344
- name: Run npm tests
4445
env:

.github/workflows/nugetTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
uses: jfrog/.github/actions/install-local-artifactory@main
6464
with:
6565
RTLIC: ${{ secrets.RTLIC }}
66+
VERSION: 7.104.15
6667

6768
- name: Run NuGet tests
6869
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.nuget

.github/workflows/pluginsTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
uses: jfrog/.github/actions/install-local-artifactory@main
3535
with:
3636
RTLIC: ${{ secrets.RTLIC }}
37+
VERSION: 7.104.15
3738

3839
- name: Run plugins tests
3940
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.plugins

.github/workflows/pythonTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
uses: jfrog/.github/actions/install-local-artifactory@main
5050
with:
5151
RTLIC: ${{ secrets.RTLIC }}
52+
VERSION: 7.104.15
5253

5354
- name: Run Python tests
5455
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.${{ matrix.suite }}

.github/workflows/transferTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
with:
5959
RTLIC: ${{ secrets.RTLIC_V6 }}
6060
JFROG_HOME: ${{ runner.temp }}
61-
VERSION: 6.23.21
61+
VERSION: 7.104.15
6262

6363
- name: Run transfer tests
6464
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.transfer --test.installDataTransferPlugin --jfrog.targetUrl=${{ secrets.PLATFORM_URL }} --jfrog.targetAdminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.home=${{ runner.temp }} --ci.runId=${{ runner.os }}-transfer-6

buildtools/cli.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,9 +934,17 @@ func NpmPublishCmd(c *cli.Context) (err error) {
934934
if npmCmd.GetXrayScan() {
935935
commandsUtils.ConditionalUploadScanFunc = scan.ConditionalUploadDefaultScanFunc
936936
}
937-
printDeploymentView, detailedSummary := log.IsStdErrTerminal(), npmCmd.IsDetailedSummary()
938-
if !detailedSummary {
939-
npmCmd.SetDetailedSummary(printDeploymentView)
937+
938+
var printDeploymentView, detailedSummary bool
939+
940+
// Deployment view and Detailed summary is not supported when using npmrc for publishing since transfer details are not available.
941+
if npmCmd.UseNative() {
942+
printDeploymentView, detailedSummary = false, false
943+
} else {
944+
printDeploymentView, detailedSummary = log.IsStdErrTerminal(), npmCmd.IsDetailedSummary()
945+
if !detailedSummary {
946+
npmCmd.SetDetailedSummary(printDeploymentView)
947+
}
940948
}
941949
err = commands.Exec(npmCmd)
942950
result := npmCmd.Result()

0 commit comments

Comments
 (0)