mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-02 02:17:15 +00:00
chore: upgrade to std-env 3 (#1665)
This commit is contained in:
parent
6f934aa9d9
commit
c8b07a6a1c
@ -34,7 +34,7 @@
|
|||||||
"rc9": "^1.2.0",
|
"rc9": "^1.2.0",
|
||||||
"scule": "^0.2.1",
|
"scule": "^0.2.1",
|
||||||
"semver": "^7.3.5",
|
"semver": "^7.3.5",
|
||||||
"std-env": "^2.3.1",
|
"std-env": "3.0.0-0",
|
||||||
"ufo": "^0.7.9",
|
"ufo": "^0.7.9",
|
||||||
"unctx": "^1.0.2",
|
"unctx": "^1.0.2",
|
||||||
"untyped": "^0.2.11"
|
"untyped": "^0.2.11"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { join, resolve } from 'pathe'
|
import { join, resolve } from 'pathe'
|
||||||
import env from 'std-env'
|
import { isDevelopment } from 'std-env'
|
||||||
import createRequire from 'create-require'
|
import createRequire from 'create-require'
|
||||||
import { pascalCase } from 'scule'
|
import { pascalCase } from 'scule'
|
||||||
import jiti from 'jiti'
|
import jiti from 'jiti'
|
||||||
@ -81,13 +81,13 @@ export default {
|
|||||||
* @version 2
|
* @version 2
|
||||||
* @version 3
|
* @version 3
|
||||||
*/
|
*/
|
||||||
dev: Boolean(env.dev),
|
dev: Boolean(isDevelopment),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether your app is being unit tested
|
* Whether your app is being unit tested
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
test: Boolean(env.test),
|
test: Boolean(isDevelopment),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to true to enable debug mode.
|
* Set to true to enable debug mode.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import env from 'std-env'
|
import { isCI, isTest } from 'std-env'
|
||||||
import { hasProtocol } from 'ufo'
|
import { hasProtocol } from 'ufo'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -10,7 +10,7 @@ export default {
|
|||||||
* @see [std-env](https://github.com/unjs/std-env)
|
* @see [std-env](https://github.com/unjs/std-env)
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
quiet: Boolean(env.ci || env.test),
|
quiet: Boolean(isCI || isTest),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nuxt uses `webpack-bundle-analyzer` to visualize your bundles and how to optimize them.
|
* Nuxt uses `webpack-bundle-analyzer` to visualize your bundles and how to optimize them.
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
"rollup-plugin-visualizer": "^5.5.2",
|
"rollup-plugin-visualizer": "^5.5.2",
|
||||||
"serve-placeholder": "^1.2.4",
|
"serve-placeholder": "^1.2.4",
|
||||||
"serve-static": "^1.14.1",
|
"serve-static": "^1.14.1",
|
||||||
"std-env": "^2.3.1",
|
"std-env": "3.0.0-0",
|
||||||
"table": "^6.7.2",
|
"table": "^6.7.2",
|
||||||
"ufo": "^0.7.9",
|
"ufo": "^0.7.9",
|
||||||
"unenv": "^0.4.0",
|
"unenv": "^0.4.0",
|
||||||
|
@ -2,7 +2,7 @@ import hasha from 'hasha'
|
|||||||
import { relative } from 'pathe'
|
import { relative } from 'pathe'
|
||||||
import table from 'table'
|
import table from 'table'
|
||||||
import isPrimitive from 'is-primitive'
|
import isPrimitive from 'is-primitive'
|
||||||
import stdenv from 'std-env'
|
import { isDebug } from 'std-env'
|
||||||
import type { ServerMiddleware } from '../../server/middleware'
|
import type { ServerMiddleware } from '../../server/middleware'
|
||||||
import virtual from './virtual'
|
import virtual from './virtual'
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ export function middleware (getMiddleware: () => ServerMiddleware[]) {
|
|||||||
load: () => {
|
load: () => {
|
||||||
const middleware = getMiddleware()
|
const middleware = getMiddleware()
|
||||||
|
|
||||||
if (stdenv.debug) {
|
if (isDebug) {
|
||||||
const dumped = dumpMiddleware(middleware)
|
const dumped = dumpMiddleware(middleware)
|
||||||
if (dumped !== lastDump) {
|
if (dumped !== lastDump) {
|
||||||
lastDump = dumped
|
lastDump = dumped
|
||||||
|
@ -4,10 +4,10 @@ import globby from 'globby'
|
|||||||
import prettyBytes from 'pretty-bytes'
|
import prettyBytes from 'pretty-bytes'
|
||||||
import gzipSize from 'gzip-size'
|
import gzipSize from 'gzip-size'
|
||||||
import chalk from 'chalk'
|
import chalk from 'chalk'
|
||||||
import stdenv from 'std-env'
|
import { isTest } from 'std-env'
|
||||||
|
|
||||||
export async function printFSTree (dir: string) {
|
export async function printFSTree (dir: string) {
|
||||||
if (stdenv.test) {
|
if (isTest) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
yarn.lock
13
yarn.lock
@ -2893,7 +2893,7 @@ __metadata:
|
|||||||
rc9: ^1.2.0
|
rc9: ^1.2.0
|
||||||
scule: ^0.2.1
|
scule: ^0.2.1
|
||||||
semver: ^7.3.5
|
semver: ^7.3.5
|
||||||
std-env: ^2.3.1
|
std-env: 3.0.0-0
|
||||||
ufo: ^0.7.9
|
ufo: ^0.7.9
|
||||||
unbuild: latest
|
unbuild: latest
|
||||||
unctx: ^1.0.2
|
unctx: ^1.0.2
|
||||||
@ -2972,7 +2972,7 @@ __metadata:
|
|||||||
rollup-plugin-visualizer: ^5.5.2
|
rollup-plugin-visualizer: ^5.5.2
|
||||||
serve-placeholder: ^1.2.4
|
serve-placeholder: ^1.2.4
|
||||||
serve-static: ^1.14.1
|
serve-static: ^1.14.1
|
||||||
std-env: ^2.3.1
|
std-env: 3.0.0-0
|
||||||
table: ^6.7.2
|
table: ^6.7.2
|
||||||
ufo: ^0.7.9
|
ufo: ^0.7.9
|
||||||
unbuild: latest
|
unbuild: latest
|
||||||
@ -18931,7 +18931,14 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"std-env@npm:^2.2.1, std-env@npm:^2.3.0, std-env@npm:^2.3.1":
|
"std-env@npm:3.0.0-0":
|
||||||
|
version: 3.0.0-0
|
||||||
|
resolution: "std-env@npm:3.0.0-0"
|
||||||
|
checksum: 0a0b5daaafeadc570ebaa7b36603f3a04f43a6eb893feeeaaae3caa3d0a2fa6f3a5c0f9376bd8245c73d289b2c3b2176de0daa4f75de0f2c6c125e32a95880d8
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"std-env@npm:^2.2.1, std-env@npm:^2.3.0":
|
||||||
version: 2.3.1
|
version: 2.3.1
|
||||||
resolution: "std-env@npm:2.3.1"
|
resolution: "std-env@npm:2.3.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
Loading…
Reference in New Issue
Block a user