Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt/types

Package Overview
Dependencies
Maintainers
4
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/types - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

# [0.5.0](https://github.com/nuxt/typescript/compare/@nuxt/types@0.4.1...@nuxt/types@0.5.0) (2019-12-01)
### Bug Fixes
* **types:** improve consistency with class nuxtEnv ([#222](https://github.com/nuxt/typescript/issues/222)) ([2631980](https://github.com/nuxt/typescript/commit/26319806ff4f5b9c81b34f0859e3352365e4e095))
### Features
* **types:** add postcss build types ([#223](https://github.com/nuxt/typescript/issues/223)) ([7268990](https://github.com/nuxt/typescript/commit/7268990a06c6d3c8b20d1dbf312e7a3fbfd05cc4))
## [0.4.1](https://github.com/nuxt/typescript/compare/@nuxt/types@0.4.0...@nuxt/types@0.4.1) (2019-12-01)

@@ -8,0 +24,0 @@

73

config/build.d.ts

@@ -6,2 +6,13 @@ /**

import { TransformOptions, PluginItem } from '@babel/core'
import { Options as AutoprefixerOptions } from 'autoprefixer'
import { Options as FileLoaderOptions } from 'file-loader'
import { Options as HtmlMinifierOptions } from 'html-minifier'
import * as Less from 'less'
import { Options as SassOptions } from 'node-sass'
import { Options as OptimizeCssAssetsWebpackPluginOptions } from 'optimize-css-assets-webpack-plugin'
import { Plugin as PostcssPlugin } from 'postcss'
import { Options as PugOptions } from 'pug'
import { TerserPluginOptions } from 'terser-webpack-plugin'
import { VueLoaderOptions } from 'vue-loader'
import {

@@ -13,14 +24,5 @@ Configuration as WebpackConfiguration,

} from 'webpack'
import { TransformOptions, PluginItem } from '@babel/core'
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
import { Options as WebpackDevMiddlewareOptions } from 'webpack-dev-middleware'
import { Options as WebpackHotMiddlewareOptions } from 'webpack-hot-middleware'
import { Options as HtmlMinifierOptions } from 'html-minifier'
import { Options as OptimizeCssAssetsWebpackPluginOptions } from 'optimize-css-assets-webpack-plugin'
import { TerserPluginOptions } from 'terser-webpack-plugin'
import { Options as FileLoaderOptions } from 'file-loader'
import { Options as PugOptions } from 'pug'
import * as Less from 'less'
import { Options as SassOptions } from 'node-sass'
import { VueLoaderOptions } from 'vue-loader'

@@ -75,4 +77,3 @@ type CssLoaderUrlFunction = (url: string, resourcePath: string) => boolean

interface NuxtBabelPresetEnv {
envName: 'client' | 'modern' | 'server'
interface NuxtWebpackEnv {
isClient: boolean

@@ -85,2 +86,6 @@ isDev: boolean

interface NuxtBabelPresetEnv {
envName: 'client' | 'modern' | 'server'
}
interface NuxtBabelOptions extends Pick<TransformOptions, Exclude<keyof TransformOptions, 'presets'>> {

@@ -91,3 +96,3 @@ cacheCompression?: boolean

customize?: string | null
presets?: ((env: NuxtBabelPresetEnv, defaultPreset: [string, object]) => PluginItem[] | void) | PluginItem[] | null
presets?: ((env: NuxtBabelPresetEnv & NuxtWebpackEnv, defaultPreset: [string, object]) => PluginItem[] | void) | PluginItem[] | null
}

@@ -100,2 +105,35 @@

interface PostcssOrderPresetFunctions {
cssnanoLast: (names: string[]) => string[]
presetEnvAndCssnanoLast: (names: string[]) => string[]
presetEnvLast: (names: string[]) => string[]
}
type PostcssOrderPreset = keyof PostcssOrderPresetFunctions
interface PostcssVariableMap {
customMedia: Record<string, string>
customProperties: Record<string, string>
customSelectors: Record<string, string>
environmentVariables?: Record<string, string>
}
interface PostcssConfiguration {
order?: PostcssOrderPreset | string[] | ((names: string[], presets: PostcssOrderPresetFunctions) => string[])
plugins?: {
[key: string]: false | { [key: string]: any }
}
preset?: {
autoprefixer?: false | AutoprefixerOptions
browsers?: string
exportTo?: string | string[] | Partial<PostcssVariableMap> | ((map: PostcssVariableMap) => Partial<PostcssVariableMap>)
features?: {
[key: string]: boolean | { [key: string]: any }
}
importFrom?: string | string[] | Partial<PostcssVariableMap> | (() => Partial<PostcssVariableMap>)
insertAfter?: { [key: string]: PostcssPlugin<any> }
insertBefore?: { [key: string]: PostcssPlugin<any> }
preserve?: boolean
stage?: 0 | 1 | 2 | 3 | 4 | false
}
}
export interface NuxtConfigurationBuild {

@@ -113,10 +151,7 @@ additionalExtensions?: string[]

ctx: {
isDev: boolean,
isClient: boolean,
isServer: boolean,
loaders: NuxtConfigurationLoaders
}
} & NuxtWebpackEnv
): void
extractCSS?: boolean | Record<string, any>
filenames?: { [key in 'app' | 'chunk' | 'css' | 'img' | 'font' | 'video']?: (ctx: { isDev: boolean, isModern: boolean }) => string }
filenames?: { [key in 'app' | 'chunk' | 'css' | 'img' | 'font' | 'video']?: (ctx: NuxtWebpackEnv) => string }
friendlyErrors?: boolean

@@ -132,3 +167,3 @@ hardSource?: boolean

plugins?: WebpackPlugin[]
postcss?: any // TBD
postcss?: string[] | boolean | PostcssConfiguration | (() => PostcssConfiguration)
profile?: boolean

@@ -146,5 +181,5 @@ publicPath?: string

terser?: TerserPluginOptions | boolean
transpile?: (string | RegExp)[]
transpile?: (string | RegExp | ((context: NuxtWebpackEnv) => string | RegExp))[]
warningIgnoreFilters?: Array<(warn: Warning) => boolean>
watch?: string[]
}
{
"name": "@nuxt/types",
"version": "0.4.1",
"version": "0.5.0",
"description": "Nuxt.js types",

@@ -12,2 +12,3 @@ "repository": "nuxt/typescript",

"dependencies": {
"@types/autoprefixer": "^9.6.1",
"@types/babel__core": "^7.1.3",

@@ -14,0 +15,0 @@ "@types/compression": "^1.0.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc