Skip to content

Commit ebba238

Browse files
authored
chore: replace always-auth=true with auth-type=legacy (#1464)
1 parent 25737e7 commit ebba238

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

packages/core/packages/PackageManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export class PackageManager {
259259
}
260260
const cmd = /^win/.test(process.platform) ? "npm.cmd" : "npm"; //https://github.com/nodejs/node/issues/3675
261261
const login = Util.spawnSync(cmd,
262-
["adduser", `--registry=${fullPackageRegistry}`, `--scope=@infragistics`, `--always-auth`],
262+
["adduser", `--registry=${fullPackageRegistry}`, `--scope=@infragistics`, `--auth-type=legacy`],
263263
{ stdio: "inherit" }
264264
);
265265
if (login?.status === 0) {

packages/core/update/Update.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ function updateWorkflows(fs: IFileSystem): void {
266266
oldCmd: "- run: npm i # replace with 'npm ci' after committing lock file from first install",
267267
newCmd: `- run: echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
268268
- run: echo "//packages.infragistics.com/npm/js-licensed/:_auth=\${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc
269-
- run: echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
269+
- run: echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
270270
- run: npm i # replace with 'npm ci' after committing lock file from first install`
271271
},
272272
{
@@ -276,7 +276,7 @@ function updateWorkflows(fs: IFileSystem): void {
276276
newCmd: `- script: |
277277
echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
278278
echo "//packages.infragistics.com/npm/js-licensed/:_auth=$NPM_AUTH_TOKEN" >> ~/.npmrc
279-
echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
279+
echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
280280
displayName: 'Authenticate'
281281
env:
282282
NPM_AUTH_TOKEN: $(NPM_AUTH_TOKEN)
@@ -306,7 +306,7 @@ function createNpmrc(
306306
if (!fs.fileExists(npmrcPath)) {
307307
const fileContent =
308308
`@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/
309-
//packages.infragistics.com/npm/js-licensed/:always-auth=true
309+
//packages.infragistics.com/npm/js-licensed/:auth-type=legacy
310310
`;
311311
fs.writeFile(npmrcPath, fileContent);
312312
}

spec/unit/packageManager-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe("Unit - Package Manager", () => {
7979
expect(path.join).toHaveBeenCalled();
8080
expect(Util.spawnSync).toHaveBeenCalledWith(
8181
/^win/.test(process.platform) ? "npm.cmd" : "npm",
82-
["adduser", `--registry=trial`, `--scope=@infragistics`, `--always-auth`],
82+
["adduser", `--registry=trial`, `--scope=@infragistics`, `--auth-type=legacy`],
8383
{
8484
stdio: "inherit"
8585
}
@@ -176,7 +176,7 @@ describe("Unit - Package Manager", () => {
176176
); // x1
177177
expect(Util.spawnSync).toHaveBeenCalledWith(
178178
/^win/.test(process.platform) ? "npm.cmd" : "npm",
179-
["adduser", `--registry=trial`, `--scope=@infragistics`, `--always-auth`],
179+
["adduser", `--registry=trial`, `--scope=@infragistics`, `--auth-type=legacy`],
180180
{
181181
stdio: "inherit"
182182
}

spec/unit/update-spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe("updateWorkspace", () => {
111111
content: "",
112112
expected:
113113
`@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/
114-
//packages.infragistics.com/npm/js-licensed/:always-auth=true
114+
//packages.infragistics.com/npm/js-licensed/:auth-type=legacy
115115
`};
116116
(fsSpy.glob as jasmine.Spy).and.returnValues(// per workspace
117117
["package.json"], // root package.json
@@ -290,7 +290,7 @@ title = 'igniteui-angular example';
290290
`# start content
291291
- run: echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
292292
- run: echo "//packages.infragistics.com/npm/js-licensed/:_auth=\${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc
293-
- run: echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
293+
- run: echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
294294
- run: npm i # replace with \'npm ci\' after committing lock file from first install
295295
# end content
296296
`},
@@ -305,7 +305,7 @@ title = 'igniteui-angular example';
305305
`# start content
306306
- run: echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
307307
- run: echo "//packages.infragistics.com/npm/js-licensed/:_auth=\${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc
308-
- run: echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
308+
- run: echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
309309
- run: npm i # replace with 'npm ci' after committing lock file from first install
310310
# end content
311311
`},
@@ -321,7 +321,7 @@ title = 'igniteui-angular example';
321321
- script: |
322322
echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
323323
echo "//packages.infragistics.com/npm/js-licensed/:_auth=$NPM_AUTH_TOKEN" >> ~/.npmrc
324-
echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
324+
echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
325325
displayName: 'Authenticate'
326326
env:
327327
NPM_AUTH_TOKEN: $(NPM_AUTH_TOKEN)
@@ -613,7 +613,7 @@ export default function Home() {
613613
`# start content
614614
- run: echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
615615
- run: echo "//packages.infragistics.com/npm/js-licensed/:_auth=\${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc
616-
- run: echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
616+
- run: echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
617617
- run: npm i # replace with \'npm ci\' after committing lock file from first install
618618
# end content
619619
`},
@@ -628,7 +628,7 @@ export default function Home() {
628628
`# start content
629629
- run: echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
630630
- run: echo "//packages.infragistics.com/npm/js-licensed/:_auth=\${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc
631-
- run: echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
631+
- run: echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
632632
- run: npm i # replace with 'npm ci' after committing lock file from first install
633633
# end content
634634
`},
@@ -644,7 +644,7 @@ export default function Home() {
644644
- script: |
645645
echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
646646
echo "//packages.infragistics.com/npm/js-licensed/:_auth=$NPM_AUTH_TOKEN" >> ~/.npmrc
647-
echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
647+
echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
648648
displayName: 'Authenticate'
649649
env:
650650
NPM_AUTH_TOKEN: $(NPM_AUTH_TOKEN)
@@ -1191,7 +1191,7 @@ export default class App extends LitElement {
11911191
`# start content
11921192
- run: echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
11931193
- run: echo "//packages.infragistics.com/npm/js-licensed/:_auth=\${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc
1194-
- run: echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
1194+
- run: echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
11951195
- run: npm i # replace with \'npm ci\' after committing lock file from first install
11961196
# end content
11971197
`},
@@ -1206,7 +1206,7 @@ export default class App extends LitElement {
12061206
`# start content
12071207
- run: echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
12081208
- run: echo "//packages.infragistics.com/npm/js-licensed/:_auth=\${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc
1209-
- run: echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
1209+
- run: echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
12101210
- run: npm i # replace with 'npm ci' after committing lock file from first install
12111211
# end content
12121212
`},
@@ -1222,7 +1222,7 @@ export default class App extends LitElement {
12221222
- script: |
12231223
echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
12241224
echo "//packages.infragistics.com/npm/js-licensed/:_auth=$NPM_AUTH_TOKEN" >> ~/.npmrc
1225-
echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
1225+
echo "//packages.infragistics.com/npm/js-licensed/:auth-type=legacy" >> ~/.npmrc
12261226
displayName: 'Authenticate'
12271227
env:
12281228
NPM_AUTH_TOKEN: $(NPM_AUTH_TOKEN)

0 commit comments

Comments
 (0)