A RetroSearch Logo

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

Search Query:

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

create smoke-publish-test.sh script (#7483) · npm/cli@e9fdc9a · GitHub

@@ -7,7 +7,7 @@ const MockRegistry = require('@npmcli/mock-registry')

7 7

const http = require('http')

8 8

const { createProxy } = require('proxy')

9 9 10 -

const { SMOKE_PUBLISH_NPM, SMOKE_PUBLISH_TARBALL, CI, PATH, Path } = process.env

10 +

const { SMOKE_PUBLISH_TARBALL, CI, PATH, Path } = process.env

11 11 12 12

const DEFAULT_REGISTRY = new URL('https://registry.npmjs.org/')

13 13

const MOCK_REGISTRY = new URL('http://smoke-test-registry.club/')

@@ -75,6 +75,8 @@ const getCleanPaths = async () => {

75 75 76 76

module.exports = async (t, { testdir = {}, debug, mockRegistry = true, useProxy = false } = {}) => {

77 77

const debugLog = debug || CI ? (...a) => t.comment(...a) : () => {}

78 +

debugLog({ SMOKE_PUBLISH_TARBALL, CI })

79 + 78 80

const cleanPaths = await getCleanPaths()

79 81 80 82

// setup fixtures

@@ -170,19 +172,11 @@ module.exports = async (t, { testdir = {}, debug, mockRegistry = true, useProxy

170 172

})

171 173 172 174

// In debug mode, stream stdout and stderr to console so we can debug hanging processes

173 -

if (debug) {

174 -

p.process.stdout.on('data', (c) => log('STDOUT: ' + c.toString().trim()))

175 -

p.process.stderr.on('data', (c) => log('STDERR: ' + c.toString().trim()))

176 -

}

175 +

p.process.stdout.on('data', (c) => log(c.toString().trim()))

176 +

p.process.stderr.on('data', (c) => log(c.toString().trim()))

177 177 178 178

const { stdout, stderr } = await p

179 -

// If not in debug mode, print full stderr and stdout contents separately

180 -

if (!debug) {

181 -

log(stderr)

182 -

log('-'.repeat(40))

183 -

log(stdout)

184 -

log('='.repeat(40))

185 -

}

179 +

log('='.repeat(40))

186 180 187 181

return { stderr, stdout }

188 182

}

@@ -225,7 +219,7 @@ module.exports = async (t, { testdir = {}, debug, mockRegistry = true, useProxy

225 219 226 220

const npmLocal = async (...args) => {

227 221

const [{ force = false }] = getOpts(...args)

228 -

if (SMOKE_PUBLISH_NPM && !force) {

222 +

if (SMOKE_PUBLISH_TARBALL && !force) {

229 223

throw new Error('npmLocal cannot be called during smoke-publish')

230 224

}

231 225

return baseNpm({

@@ -257,7 +251,7 @@ module.exports = async (t, { testdir = {}, debug, mockRegistry = true, useProxy

257 251

return {

258 252

npmPath,

259 253

npmLocal,

260 -

npm: SMOKE_PUBLISH_NPM ? npmPath : npm,

254 +

npm: SMOKE_PUBLISH_TARBALL ? npmPath : npm,

261 255

spawn: baseSpawn,

262 256

readFile,

263 257

getPath,

@@ -275,6 +269,6 @@ module.exports.testdir = testdirHelper

275 269

module.exports.getNpmRoot = getNpmRoot

276 270

module.exports.CLI_ROOT = CLI_ROOT

277 271

module.exports.WINDOWS = WINDOWS

278 -

module.exports.SMOKE_PUBLISH = !!SMOKE_PUBLISH_NPM

272 +

module.exports.SMOKE_PUBLISH = !!SMOKE_PUBLISH_TARBALL

279 273

module.exports.SMOKE_PUBLISH_TARBALL = SMOKE_PUBLISH_TARBALL

280 274

module.exports.MOCK_REGISTRY = MOCK_REGISTRY


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