mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-07-05 14:21:06 +08:00
Compare commits
7 Commits
99d705e597
...
d4e49b59ff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4e49b59ff | ||
|
|
1d0bbb39d1 | ||
|
|
dada6a42fc | ||
|
|
4bb4a6622f | ||
|
|
90deb2439f | ||
|
|
173a364dae | ||
|
|
0c0191332a |
@ -21,7 +21,7 @@
|
||||
"@vant/eslint-config": "workspace:*",
|
||||
"@vant/stylelint-config": "workspace:*",
|
||||
"eslint": "^8.2.0",
|
||||
"husky": "^7.0.4",
|
||||
"husky": "^8.0.1",
|
||||
"lint-staged": "^12.1.2",
|
||||
"prettier": "^2.5.0",
|
||||
"rimraf": "^3.0.2",
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "@vant/area-data",
|
||||
"version": "1.2.4",
|
||||
"version": "1.3.0",
|
||||
"description": "Vant 省市区数据",
|
||||
"main": "dist/index.cjs.js",
|
||||
"module": "dist/index.esm.js",
|
||||
"module": "dist/index.esm.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
"gh-pages": "^3.2.3",
|
||||
"hash-sum": "^2.0.0",
|
||||
"highlight.js": "^11.3.1",
|
||||
"husky": "^7.0.4",
|
||||
"husky": "^8.0.1",
|
||||
"jest": "^27.3.1",
|
||||
"jest-canvas-mock": "^2.3.1",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
|
||||
@ -2,7 +2,7 @@ import fse from 'fs-extra';
|
||||
import babel from '@babel/core';
|
||||
import esbuild, { type Format } from 'esbuild';
|
||||
import { sep } from 'path';
|
||||
import { isJsx, replaceExt } from '../common/index.js';
|
||||
import { isJsx, replaceExt, getVantConfig } from '../common/index.js';
|
||||
import { replaceCSSImportExt } from '../common/css.js';
|
||||
import { replaceScriptImportExt } from './get-deps.js';
|
||||
|
||||
@ -50,7 +50,9 @@ export async function compileScript(
|
||||
|
||||
({ code } = esbuildResult);
|
||||
|
||||
const jsFilePath = replaceExt(filePath, '.js');
|
||||
const extensionMap = getVantConfig().build?.extensions;
|
||||
const extension = extensionMap?.[format] || '.js';
|
||||
const jsFilePath = replaceExt(filePath, extension);
|
||||
removeSync(filePath);
|
||||
outputFileSync(jsFilePath, code);
|
||||
}
|
||||
|
||||
@ -14,7 +14,9 @@ export function getViteConfigForPackage({
|
||||
}): InlineConfig {
|
||||
setBuildTarget('package');
|
||||
|
||||
const { name } = getVantConfig();
|
||||
const { name, build } = getVantConfig();
|
||||
const entryExtension = build?.extensions?.esm || '.js';
|
||||
const entry = join(ES_DIR, `index${entryExtension}`);
|
||||
|
||||
return {
|
||||
root: CWD,
|
||||
@ -24,7 +26,7 @@ export function getViteConfigForPackage({
|
||||
build: {
|
||||
lib: {
|
||||
name,
|
||||
entry: join(ES_DIR, 'index.js'),
|
||||
entry,
|
||||
formats,
|
||||
fileName: (format: string) => {
|
||||
const suffix = format === 'umd' ? '' : `.${format}`;
|
||||
|
||||
@ -51,6 +51,7 @@ module.exports = {
|
||||
'vue/require-v-for-key': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/no-unused-components': 'off',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/return-in-computed-property': 'off',
|
||||
// typescript-eslint
|
||||
'@typescript-eslint/camelcase': 'off',
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "@vant/popperjs",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"description": "Pre-compiled popperjs core",
|
||||
"main": "dist/index.cjs.js",
|
||||
"module": "dist/index.esm.js",
|
||||
"module": "dist/index.esm.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
const { build } = require('esbuild');
|
||||
|
||||
function bundleBundle(format) {
|
||||
const outfile = `dist/index.${format}.js`;
|
||||
const ext = format === 'esm' ? '.mjs' : '.js';
|
||||
const outfile = `dist/index.${format}${ext}`;
|
||||
const finish = () => console.log('Build finished:', outfile);
|
||||
const onRebuild = (error) => (error ? console.log(error) : finish());
|
||||
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## v1.4.0
|
||||
|
||||
- Using `.mjs` extension, `dist/index.esm.js` -> `dist/index.esm.mjs`
|
||||
|
||||
## v1.3.6
|
||||
|
||||
- Fix missing VisibilityState type
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "@vant/use",
|
||||
"version": "1.3.6",
|
||||
"version": "1.4.0",
|
||||
"description": "Vant Composition API",
|
||||
"main": "dist/index.cjs.js",
|
||||
"module": "dist/index.esm.js",
|
||||
"module": "dist/index.esm.mjs",
|
||||
"typings": "dist/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
|
||||
@ -62,14 +62,14 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@vant/icons": "^1.8.0",
|
||||
"@vant/popperjs": "^1.1.0",
|
||||
"@vant/use": "^1.3.6"
|
||||
"@vant/popperjs": "^1.2.0",
|
||||
"@vant/use": "^1.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vant/area-data": "^1.1.3",
|
||||
"@vant/area-data": "workspace:*",
|
||||
"@vant/cli": "workspace:*",
|
||||
"@vant/eslint-config": "workspace:*",
|
||||
"@vue/runtime-core": "^3.2.27",
|
||||
|
||||
@ -6,9 +6,9 @@ exports[`should render content slot correctly 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`should render nothing when content is empty string 1`] = ``;
|
||||
exports[`should render nothing when content is empty string 1`] = `""`;
|
||||
|
||||
exports[`should render nothing when content is undefined 1`] = ``;
|
||||
exports[`should render nothing when content is undefined 1`] = `""`;
|
||||
|
||||
exports[`should render nothing when content is zero 1`] = `
|
||||
<div class="van-badge van-badge--top-right">
|
||||
|
||||
@ -565,7 +565,7 @@ test('close-preview event', async () => {
|
||||
});
|
||||
|
||||
await later();
|
||||
wrapper.find('.van-image').trigger('click');
|
||||
await wrapper.find('.van-image').trigger('click');
|
||||
|
||||
const preview = document.querySelector<HTMLDivElement>('.van-image-preview');
|
||||
const swipe = preview?.querySelector<HTMLDivElement>(
|
||||
|
||||
5610
pnpm-lock.yaml
generated
5610
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user