@newlogic-digital/core 4.1.1 → 4.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +43 -0
  2. package/package.json +9 -9
package/index.js CHANGED
@@ -11,9 +11,31 @@ import process from 'node:process'
11
11
  import heroicons from '@newlogic-digital/vite-plugin-heroicons'
12
12
  import { fileURLToPath } from 'node:url'
13
13
  import { processPostcssCustomProperties } from './src/postcssCustomProperties.js'
14
+ import { createLogger } from 'vite'
15
+ import console from 'node:console'
14
16
 
15
17
  const { name } = getPackageInfo(import.meta.url)
16
18
 
19
+ const logger = createLogger()
20
+ const consoleWarn = console.warn.bind(console)
21
+ const ignoredPseudoClasses = [
22
+ 'interest-source',
23
+ 'interest-target',
24
+ ]
25
+
26
+ const isUnknownPseudoClassWarning = (/** @type {string | string[]} */ message) => (
27
+ message.includes('is not recognized as a valid pseudo-class')
28
+ && ignoredPseudoClasses.some(pseudoClass => message.includes(pseudoClass))
29
+ )
30
+
31
+ console.warn = (...messages) => {
32
+ if (messages.some(message => isUnknownPseudoClassWarning(String(message)))) {
33
+ return
34
+ }
35
+
36
+ consoleWarn(...messages)
37
+ }
38
+
17
39
  /**
18
40
  * @type {import('@newlogic-digital/core/types').PluginUserConfig}
19
41
  */
@@ -151,6 +173,27 @@ const plugin = async (options = {}) => {
151
173
  * @param {import('vite').ConfigEnv} userEnv
152
174
  */
153
175
  config(userConfig, userEnv) {
176
+ userConfig.customLogger = Object.assign({
177
+ ...logger,
178
+ /**
179
+ * @param {string} message
180
+ * @param {import("vite").LogOptions} options
181
+ */
182
+ warn(message, options) {
183
+ if (
184
+ isUnknownPseudoClassWarning(message)
185
+ && (
186
+ message.includes('[lightningcss minify]')
187
+ || message.includes('[vite:css][lightningcss]')
188
+ )
189
+ ) {
190
+ return
191
+ }
192
+
193
+ logger.warn(message, options)
194
+ },
195
+ }, userConfig.customLogger)
196
+
154
197
  // @ts-ignore
155
198
  const isHttps = userConfig?.server?.https !== false
156
199
  && fs.existsSync(join(os.homedir(), `.ssh/${options.cert}.pem`))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newlogic-digital/core",
3
3
  "type": "module",
4
- "version": "4.1.1",
4
+ "version": "4.1.3",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "newlogic-core": "./bin/newlogic-core.js"
@@ -27,16 +27,16 @@
27
27
  "browserslist": "^4.28.2",
28
28
  "browserslist-to-esbuild": "^2.1.1",
29
29
  "lightningcss": "^1.32.0",
30
- "npm-check-updates": "^21.0.2",
31
- "oxlint": "^1.60.0",
30
+ "npm-check-updates": "^22.2.0",
31
+ "oxlint": "^1.65.0",
32
32
  "postcss-custom-properties": "^15.0.1",
33
33
  "stylelint-config-standard": "^40.0.0",
34
- "vituum": "^2.0.1"
34
+ "vituum": "^2.0.2"
35
35
  },
36
36
  "peerDependencies": {
37
- "@tailwindcss/vite": "4.2.2",
37
+ "@tailwindcss/vite": "^4.2.4",
38
38
  "@vituum/vite-plugin-twig": "^2.0.1",
39
- "vite": "^8.0.1"
39
+ "vite": "^8.0.10"
40
40
  },
41
41
  "peerDependenciesMeta": {
42
42
  "@vituum/vite-plugin-twig": {
@@ -47,10 +47,10 @@
47
47
  }
48
48
  },
49
49
  "devDependencies": {
50
- "@tailwindcss/vite": "^4.2.2",
51
- "@types/node": "^25.6",
50
+ "@tailwindcss/vite": "^4.3.0",
51
+ "@types/node": "^25.8",
52
52
  "@vituum/vite-plugin-twig": "^2.0.1",
53
- "rolldown": "^1.0.0-rc.16",
53
+ "rolldown": "^1.0.1",
54
54
  "typescript": "^6"
55
55
  },
56
56
  "files": [