weapp-tailwindcss 2.8.2 → 2.8.4

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.
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var options = require('./options-50d69eba.js');
3
+ var options = require('./options-904051d2.js');
4
4
  require('micromatch');
5
5
  require('magic-string');
6
6
  require('./replace.js');
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as getOptions, c as createPatch } from './options-8a945166.mjs';
1
+ import { g as getOptions, c as createPatch } from './options-c9c14817.mjs';
2
2
  import 'micromatch';
3
3
  import 'magic-string';
4
4
  import './replace.mjs';
package/dist/gulp.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var stream = require('node:stream');
6
- var options = require('./options-50d69eba.js');
6
+ var options = require('./options-904051d2.js');
7
7
  require('micromatch');
8
8
  require('magic-string');
9
9
  require('./replace.js');
package/dist/gulp.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import stream from 'node:stream';
2
- import { g as getOptions, a as createTailwindcssPatcher } from './options-8a945166.mjs';
2
+ import { g as getOptions, a as createTailwindcssPatcher } from './options-c9c14817.mjs';
3
3
  import 'micromatch';
4
4
  import 'magic-string';
5
5
  import './replace.mjs';
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ var vite = require('./vite.js');
7
7
  var gulp = require('./gulp.js');
8
8
  require('node:path');
9
9
  require('node:fs');
10
- require('./options-50d69eba.js');
10
+ require('./options-904051d2.js');
11
11
  require('micromatch');
12
12
  require('magic-string');
13
13
  require('./replace.js');
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ export { UnifiedViteWeappTailwindcssPlugin } from './vite.mjs';
3
3
  export { createPlugins } from './gulp.mjs';
4
4
  import 'node:path';
5
5
  import 'node:fs';
6
- import './options-8a945166.mjs';
6
+ import './options-c9c14817.mjs';
7
7
  import 'micromatch';
8
8
  import 'magic-string';
9
9
  import './replace.mjs';
@@ -175,9 +175,17 @@ function isEvalPath(p) {
175
175
  }
176
176
  function jsHandler(rawSource, options) {
177
177
  var _a;
178
- const ast = parser.parse(rawSource, {
179
- sourceType: 'unambiguous'
180
- });
178
+ let ast;
179
+ try {
180
+ ast = parser.parse(rawSource, {
181
+ sourceType: 'unambiguous'
182
+ });
183
+ }
184
+ catch (_b) {
185
+ return {
186
+ code: rawSource
187
+ };
188
+ }
181
189
  if (options.strategy === 'replace') {
182
190
  const ms = new MagicString__default["default"](rawSource);
183
191
  const ropt = {
@@ -439,7 +447,7 @@ function customTemplateHandler(rawSource, options) {
439
447
  function update() {
440
448
  s.update(parser.startIndex + name.length + 2, parser.endIndex, templateReplacer(value, options));
441
449
  }
442
- if (!disabledDefaultTemplateHandler && (name === 'class' || name === 'hover-class')) {
450
+ if (!disabledDefaultTemplateHandler && (name === 'class' || name === 'hover-class' || name === 'virtualhostclass')) {
443
451
  update();
444
452
  }
445
453
  for (const [t, props] of customAttributesEntities) {
@@ -144,9 +144,17 @@ function isEvalPath(p) {
144
144
  }
145
145
  function jsHandler(rawSource, options) {
146
146
  var _a;
147
- const ast = parse(rawSource, {
148
- sourceType: 'unambiguous'
149
- });
147
+ let ast;
148
+ try {
149
+ ast = parse(rawSource, {
150
+ sourceType: 'unambiguous'
151
+ });
152
+ }
153
+ catch (_b) {
154
+ return {
155
+ code: rawSource
156
+ };
157
+ }
150
158
  if (options.strategy === 'replace') {
151
159
  const ms = new MagicString(rawSource);
152
160
  const ropt = {
@@ -408,7 +416,7 @@ function customTemplateHandler(rawSource, options) {
408
416
  function update() {
409
417
  s.update(parser.startIndex + name.length + 2, parser.endIndex, templateReplacer(value, options));
410
418
  }
411
- if (!disabledDefaultTemplateHandler && (name === 'class' || name === 'hover-class')) {
419
+ if (!disabledDefaultTemplateHandler && (name === 'class' || name === 'hover-class' || name === 'virtualhostclass')) {
412
420
  update();
413
421
  }
414
422
  for (const [t, props] of customAttributesEntities) {
package/dist/vite.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var options = require('./options-50d69eba.js');
5
+ var options = require('./options-904051d2.js');
6
6
  var postcss = require('./postcss-8d7f67b4.js');
7
7
  var defaults = require('./defaults-263271f9.js');
8
8
  require('micromatch');
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as getOptions, a as createTailwindcssPatcher } from './options-8a945166.mjs';
1
+ import { g as getOptions, a as createTailwindcssPatcher } from './options-c9c14817.mjs';
2
2
  import { v as vitePluginName } from './postcss-55ed4d42.mjs';
3
3
  import { g as getGroupedEntries } from './defaults-dc8a0e3d.mjs';
4
4
  import 'micromatch';
package/dist/webpack.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var path = require('node:path');
6
6
  var fs = require('node:fs');
7
- var options = require('./options-50d69eba.js');
7
+ var options = require('./options-904051d2.js');
8
8
  var postcss = require('./postcss-8d7f67b4.js');
9
9
  var defaults = require('./defaults-263271f9.js');
10
10
  require('micromatch');
package/dist/webpack.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import path from 'node:path';
2
2
  import fs from 'node:fs';
3
- import { g as getOptions, a as createTailwindcssPatcher } from './options-8a945166.mjs';
3
+ import { g as getOptions, a as createTailwindcssPatcher } from './options-c9c14817.mjs';
4
4
  import { a as pluginName } from './postcss-55ed4d42.mjs';
5
5
  import { g as getGroupedEntries } from './defaults-dc8a0e3d.mjs';
6
6
  import 'micromatch';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weapp-tailwindcss",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
4
4
  "description": "把tailwindcss jit引擎,带给小程序开发者们! bring tailwindcss jit engine to miniprogram developers!",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -102,7 +102,7 @@
102
102
  },
103
103
  "homepage": "https://weapp-tw.icebreaker.top",
104
104
  "devDependencies": {
105
- "@babel/core": "^7.22.11",
105
+ "@babel/core": "^7.22.17",
106
106
  "@icebreakers/cli": "0.1.1",
107
107
  "@icebreakers/readme": "0.1.0",
108
108
  "@rollup/plugin-alias": "^5.0.0",
@@ -122,14 +122,14 @@
122
122
  "@types/js-beautify": "^1.14.0",
123
123
  "@types/klaw": "^3.0.3",
124
124
  "@types/loader-utils": "^2.0.4",
125
- "@types/lodash": "^4.14.197",
125
+ "@types/lodash": "^4.14.198",
126
126
  "@types/micromatch": "^4.0.2",
127
- "@types/node": "^20.5.7",
127
+ "@types/node": "^20.6.0",
128
128
  "@types/semver": "^7.5.1",
129
129
  "@types/vinyl": "^2.0.7",
130
130
  "@types/webpack": "^5.28.2",
131
131
  "@types/webpack-sources": "^3.2.0",
132
- "@vitest/coverage-v8": "^0.34.3",
132
+ "@vitest/coverage-v8": "^0.34.4",
133
133
  "autoprefixer": "^10.4.15",
134
134
  "babel-loader": "^9.1.3",
135
135
  "bumpp": "^9.2.0",
@@ -141,7 +141,7 @@
141
141
  "del": "^7.1.0",
142
142
  "diff": "^5.1.0",
143
143
  "domhandler": "^5.0.3",
144
- "eslint": "8.48.0",
144
+ "eslint": "8.49.0",
145
145
  "eslint-config-icebreaker": "^1.2.2",
146
146
  "eslint-config-prettier": "^9.0.0",
147
147
  "eslint-plugin-prettier": "^5.0.0",
@@ -151,7 +151,7 @@
151
151
  "gulp": "^4.0.2",
152
152
  "gulp-postcss": "^9.0.1",
153
153
  "html-loader": "^4.2.0",
154
- "jest": "^29.6.4",
154
+ "jest": "^29.7.0",
155
155
  "js-beautify": "^1.14.9",
156
156
  "klaw": "^4.1.0",
157
157
  "lodash": "^4.17.21",
@@ -163,7 +163,7 @@
163
163
  "postcss-rem-to-responsive-pixel": "^5.1.3",
164
164
  "prettier": "^3.0.3",
165
165
  "promisify-loader-runner": "^1.0.0",
166
- "rollup": "^3.28.1",
166
+ "rollup": "^3.29.1",
167
167
  "rollup-plugin-visualizer": "^5.9.2",
168
168
  "style-loader": "^3.3.3",
169
169
  "tailwind-children": "^0.5.0",
@@ -171,24 +171,24 @@
171
171
  "ts-jest": "^29.1.1",
172
172
  "ts-node": "^10.9.1",
173
173
  "ts-patch": "^3.0.2",
174
- "tsd": "^0.28.1",
174
+ "tsd": "^0.29.0",
175
175
  "tslib": "^2.6.2",
176
176
  "typescript": "^5.2.2",
177
177
  "typescript-transform-paths": "^3.4.6",
178
178
  "vinyl": "^3.0.0",
179
179
  "vite": "^4.4.9",
180
- "vitest": "^0.34.3",
180
+ "vitest": "^0.34.4",
181
181
  "weapp-tailwindcss-children": "^0.1.0",
182
182
  "webpack": "^5.88.2",
183
183
  "webpack-build-utils": "^0.0.4"
184
184
  },
185
185
  "dependencies": {
186
186
  "@ast-core/escape": "^1.0.1",
187
- "@babel/generator": "^7.22.10",
188
- "@babel/parser": "^7.22.14",
189
- "@babel/traverse": "^7.22.11",
190
- "@babel/types": "^7.22.11",
191
- "@csstools/postcss-is-pseudo-class": "^4.0.0",
187
+ "@babel/generator": "^7.22.15",
188
+ "@babel/parser": "^7.22.16",
189
+ "@babel/traverse": "^7.22.17",
190
+ "@babel/types": "^7.22.17",
191
+ "@csstools/postcss-is-pseudo-class": "^4.0.1",
192
192
  "@tailwindcss-mangle/shared": "^2.1.0",
193
193
  "@weapp-core/escape": "^2.0.0",
194
194
  "@weapp-core/regex": "^1.0.1",