A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/cli/commit/16b7367245a0ea7228a27a43555eefb3c6b16870 below:

publishing prerelease requires explicit tag (#7910) · npm/cli@16b7367 · GitHub

@@ -521,6 +521,7 @@ t.test('workspaces', t => {

521 521

t.test('all workspaces - no color', async t => {

522 522

const { npm, joinedOutput, logs } = await loadMockNpm(t, {

523 523

config: {

524 +

tag: 'latest',

524 525

color: false,

525 526

...auth,

526 527

workspaces: true,

@@ -551,6 +552,7 @@ t.test('workspaces', t => {

551 552

const { npm, joinedOutput, logs } = await loadMockNpm(t, {

552 553

config: {

553 554

...auth,

555 +

tag: 'latest',

554 556

color: 'always',

555 557

workspaces: true,

556 558

},

@@ -580,6 +582,7 @@ t.test('workspaces', t => {

580 582

const { npm, joinedOutput } = await loadMockNpm(t, {

581 583

config: {

582 584

...auth,

585 +

tag: 'latest',

583 586

workspace: ['workspace-a'],

584 587

},

585 588

prefixDir: dir,

@@ -601,6 +604,7 @@ t.test('workspaces', t => {

601 604

const { npm } = await loadMockNpm(t, {

602 605

config: {

603 606

...auth,

607 +

tag: 'latest',

604 608

workspace: ['workspace-a'],

605 609

},

606 610

prefixDir: dir,

@@ -642,6 +646,7 @@ t.test('workspaces', t => {

642 646

const { npm, joinedOutput } = await loadMockNpm(t, {

643 647

config: {

644 648

...auth,

649 +

tag: 'latest',

645 650

workspaces: true,

646 651

},

647 652

prefixDir: testDir,

@@ -663,6 +668,7 @@ t.test('workspaces', t => {

663 668

const { npm } = await loadMockNpm(t, {

664 669

config: {

665 670

...auth,

671 +

tag: 'latest',

666 672

workspace: ['workspace-x'],

667 673

},

668 674

prefixDir: dir,

@@ -677,6 +683,7 @@ t.test('workspaces', t => {

677 683

const { npm, joinedOutput } = await loadMockNpm(t, {

678 684

config: {

679 685

...auth,

686 +

tag: 'latest',

680 687

workspaces: true,

681 688

json: true,

682 689

},

@@ -725,6 +732,7 @@ t.test('workspaces', t => {

725 732

const { npm, joinedOutput } = await loadMockNpm(t, {

726 733

config: {

727 734

...auth,

735 +

tag: 'latest',

728 736

},

729 737

prefixDir: testDir,

730 738

chdir: ({ prefix }) => path.resolve(prefix, './workspace-a'),

@@ -988,3 +996,75 @@ t.test('manifest', async t => {

988 996 989 997

t.matchSnapshot(manifest, 'manifest')

990 998

})

999 + 1000 +

t.test('aborts when prerelease and no tag', async t => {

1001 +

const { npm } = await loadMockNpm(t, {

1002 +

config: {

1003 +

loglevel: 'silent',

1004 +

[`${alternateRegistry.slice(6)}/:_authToken`]: 'test-other-token',

1005 +

},

1006 +

prefixDir: {

1007 +

'package.json': JSON.stringify({

1008 +

...pkgJson,

1009 +

version: '1.0.0-0',

1010 +

publishConfig: { registry: alternateRegistry },

1011 +

}, null, 2),

1012 +

},

1013 +

})

1014 + 1015 +

await t.rejects(async () => {

1016 +

await npm.exec('publish', [])

1017 +

}, new Error('You must specify a tag using --tag when publishing a prerelease version'))

1018 +

})

1019 + 1020 +

t.test('does not abort when prerelease and authored tag latest', async t => {

1021 +

const prereleasePkg = {

1022 +

...pkgJson,

1023 +

version: '1.0.0-0',

1024 +

}

1025 +

const { npm } = await loadMockNpm(t, {

1026 +

config: {

1027 +

loglevel: 'silent',

1028 +

tag: 'latest',

1029 +

[`${alternateRegistry.slice(6)}/:_authToken`]: 'test-other-token',

1030 +

},

1031 +

prefixDir: {

1032 +

'package.json': JSON.stringify({

1033 +

...prereleasePkg,

1034 +

publishConfig: { registry: alternateRegistry },

1035 +

}, null, 2),

1036 +

},

1037 +

})

1038 +

const registry = new MockRegistry({

1039 +

tap: t,

1040 +

registry: alternateRegistry,

1041 +

authorization: 'test-other-token',

1042 +

})

1043 +

registry.nock.put(`/${pkg}`, body => {

1044 +

return t.match(body, {

1045 +

_id: pkg,

1046 +

name: pkg,

1047 +

'dist-tags': { latest: prereleasePkg.version },

1048 +

access: null,

1049 +

versions: {

1050 +

[prereleasePkg.version]: {

1051 +

name: pkg,

1052 +

version: prereleasePkg.version,

1053 +

_id: `${pkg}@${prereleasePkg.version}`,

1054 +

dist: {

1055 +

shasum: /\.*/,

1056 +

// eslint-disable-next-line max-len

1057 +

tarball: `http:${alternateRegistry.slice(6)}/test-package/-/test-package-${prereleasePkg.version}.tgz`,

1058 +

},

1059 +

publishConfig: {

1060 +

registry: alternateRegistry,

1061 +

},

1062 +

},

1063 +

},

1064 +

_attachments: {

1065 +

[`${pkg}-${prereleasePkg.version}.tgz`]: {},

1066 +

},

1067 +

})

1068 +

}).reply(200, {})

1069 +

await npm.exec('publish', [])

1070 +

})


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4