components-helper
Advanced tools
Comparing version 2.1.5 to 2.2.0
# Changelog | ||
### 2.2.0 | ||
berak change | ||
- change the type to module (#45) | ||
``` diff | ||
- index.js | ||
+ index.cjs | ||
- index.es.js | ||
+ index.js | ||
``` | ||
### 2.1.5 | ||
@@ -4,0 +17,0 @@ |
@@ -1,2 +0,2 @@ | ||
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var fg=require('fast-glob'),fs=require('fs'),path=require('path');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var fg__default=/*#__PURE__*/_interopDefaultLegacy(fg);var config = { | ||
import fg from'fast-glob';import {readFileSync,mkdir,writeFileSync}from'node:fs';import {resolve}from'node:path';var config = { | ||
tags: 'tags.json', | ||
@@ -28,3 +28,3 @@ attributes: 'attributes.json', | ||
};function read(path) { | ||
return fs.readFileSync(path, 'utf-8'); | ||
return readFileSync(path, 'utf-8'); | ||
}function hyphenate(str) { | ||
@@ -563,6 +563,6 @@ return str.replace(/\B([A-Z])/g, '-$1').toLowerCase(); | ||
}function write(options, type, data) { | ||
var path$1 = path.resolve(options.outDir, options[type]); | ||
var path = resolve(options.outDir, options[type]); | ||
var buffer = JSON.stringify(data, null, options.space); | ||
fs.mkdir(path.resolve(options.outDir), { recursive: true }, function () { | ||
fs.writeFileSync(path$1, buffer); | ||
mkdir(resolve(options.outDir), { recursive: true }, function () { | ||
writeFileSync(path, buffer); | ||
}); | ||
@@ -580,3 +580,3 @@ }function main(options) { | ||
var _options = Object.assign(config, options); | ||
var files = fg__default["default"].sync(_options.entry, _options.fastGlobConfig); | ||
var files = fg.sync(_options.entry, _options.fastGlobConfig); | ||
var data = files.map(function (path) { | ||
@@ -593,2 +593,2 @@ var fileContent = read(path); | ||
write(_options, 'webTypes', webTypesData); | ||
}exports.arrayToRegExp=arrayToRegExp;exports.checkArray=checkArray;exports["default"]=main;exports.filterVeturOptions=filterVeturOptions;exports.getComponentsName=getComponentsName;exports.getDocUrl=getDocUrl;exports.getTypeSymbol=getTypeSymbol;exports.getVeturDescription=getVeturDescription;exports.getWebTypes=getWebTypes;exports.getWebTypesSource=getWebTypesSource;exports.getWebTypesType=getWebTypesType;exports.hyphenate=hyphenate;exports.isArrowFunctionType=isArrowFunctionType;exports.isCommonType=isCommonType;exports.isEnumType=isEnumType;exports.isFunction=isFunction;exports.isObjectType=isObjectType;exports.isString=isString;exports.isTupleType=isTupleType;exports.isUnionType=isUnionType;exports.main=main;exports.normalize=normalize;exports.normalizeFile=normalizeFile;exports.parse=parse;exports.parseColumns=parseColumns;exports.parseRow=parseRow;exports.parseTable=parseTable;exports.parseTitle=parseTitle;exports.read=read;exports.splitString=splitString;exports.vetur=vetur;exports.webTypes=webTypes;exports.write=write; | ||
}export{arrayToRegExp,checkArray,main as default,filterVeturOptions,getComponentsName,getDocUrl,getTypeSymbol,getVeturDescription,getWebTypes,getWebTypesSource,getWebTypesType,hyphenate,isArrowFunctionType,isCommonType,isEnumType,isFunction,isObjectType,isString,isTupleType,isUnionType,main,normalize,normalizeFile,parse,parseColumns,parseRow,parseTable,parseTitle,read,splitString,vetur,webTypes,write}; |
{ | ||
"name": "components-helper", | ||
"version": "2.1.5", | ||
"version": "2.2.0", | ||
"description": "Based on the docs to provide code prompt files for vue component library", | ||
"main": "lib/index.js", | ||
"module": "lib/index.es.js", | ||
"type": "module", | ||
"main": "lib/index.cjs", | ||
"module": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./lib/index.es.js", | ||
"require": "./lib/index.js" | ||
"import": "./lib/index.js", | ||
"require": "./lib/index.cjs" | ||
} | ||
@@ -47,6 +48,6 @@ }, | ||
"engines": { | ||
"node": ">15.0.0" | ||
"node": ">=16.0.0" | ||
}, | ||
"dependencies": { | ||
"fast-glob": "^3.2.11" | ||
"fast-glob": "^3.3.2" | ||
}, | ||
@@ -53,0 +54,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
82058
0
Yes
Updatedfast-glob@^3.3.2