Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 9, 2023
1 parent 371fd1b commit e1fa8b2
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '18'
registry-url: https://registry.npmjs.org/
cache: pnpm

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ignore-workspace-root-check=true
shamefully-hoist=true
1 change: 0 additions & 1 deletion examples/vue-pug/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang='ts'>
import Foo from './Foo.vue'
// import InvalidPug from './InvalidPug_vue'
</script>

Expand Down
2 changes: 1 addition & 1 deletion examples/vue/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { join } from 'path'
import { join } from 'node:path'
import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import WindiCSS from 'vite-plugin-windicss'
Expand Down
4 changes: 2 additions & 2 deletions packages/config/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import path from 'path'
import fs from 'node:fs'
import path from 'node:path'
import _debug from 'debug'
import type { JITI } from 'jiti'
import _jiti from 'jiti'
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-utils/src/createUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fs from 'fs'
import fs from 'node:fs'
import type { Style } from 'windicss/utils/style'
import { StyleSheet } from 'windicss/utils/style'
import { CSSParser } from 'windicss/utils/parser'
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-utils/src/extractors/helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { extname } from 'path'
import { extname } from 'node:path'
import { uniq } from '@antfu/utils'
import type { Extractor, ExtractorResultDetailed } from 'windicss/types/interfaces'
import { DefaultExtractor } from './default'
Expand Down
5 changes: 2 additions & 3 deletions packages/plugin-utils/src/resolveOptions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import path from 'path'
import path from 'node:path'
import _debug from 'debug'
import { loadConfiguration } from '@windicss/config'
import type { ResolvedOptions, UserOptions, WindiCssOptions, WindiPluginUtilsOptions } from './options'
Expand Down Expand Up @@ -50,7 +50,6 @@ export async function resolveOptions(

const root = options.root || utilsOptions.root || process.cwd()

// eslint-disable-next-line prefer-const
let { config, filepath: configFilePath } = loadConfigFile
? loadConfiguration({
onConfigurationError: error => console.error(error),
Expand Down Expand Up @@ -144,7 +143,7 @@ export async function resolveOptions(
const blocklist = new Set(mergeArrays(config.blocklist, options.blocklist).flatMap(i => i.split(' ')))

// preflightOptions from config file
const configPreflightOptions = typeof config.preflight === 'boolean' ? {} : config.preflight || {}
const configPreflightOptions = (typeof config.preflight === 'boolean' ? {} : config.preflight) || {}

preflightOptions.safelist = new Set<string>(
mergeArrays(
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/virtual-module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { existsSync, promises as fs } from 'fs'
import { existsSync, promises as fs } from 'node:fs'
import type { LayerName, WindiPluginUtils } from '@windicss/plugin-utils'
import type { Plugin } from 'rollup'

Expand Down
6 changes: 3 additions & 3 deletions packages/vite-plugin-windicss/src/devtools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs'
import { dirname, resolve } from 'path'
import { fileURLToPath } from 'url'
import fs from 'node:fs'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import type { Plugin, ResolvedConfig, ViteDevServer } from 'vite'
import type { WindiPluginUtils } from '@windicss/plugin-utils'
import type { IncomingMessage } from 'connect'
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-windicss/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve } from 'path'
import { resolve } from 'node:path'
import type { Plugin, ResolvedConfig, ViteDevServer } from 'vite'
import _debug, { log } from 'debug'
import type { UserOptions, WindiPluginUtils, WindiPluginUtilsOptions } from '@windicss/plugin-utils'
Expand Down
2 changes: 1 addition & 1 deletion test/examples.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve } from 'path'
import { resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
import { createUtils } from '../packages/plugin-utils/src'

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { relative, resolve } from 'path'
import { relative, resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
import { createUtils, slash } from '../packages/plugin-utils/src'

Expand Down
1 change: 1 addition & 0 deletions test/plugins.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-require-imports */
import { describe, expect, it } from 'vitest'
import { createUtils } from '../packages/plugin-utils/src'

Expand Down
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve } from 'path'
import { resolve } from 'node:path'
import { defineConfig } from 'vite'

export default defineConfig({
Expand Down

0 comments on commit e1fa8b2

Please sign in to comment.