Compare commits

...

7 Commits

Author SHA1 Message Date
chenjiahan
d4e49b59ff docs(@vant/use): changelog 1.4.0 2022-05-22 20:56:16 +08:00
chenjiahan
1d0bbb39d1 release: @vant/area-data 1.3.0 2022-05-22 20:52:41 +08:00
chenjiahan
dada6a42fc release: @vant/popperjs 1.2.0 2022-05-22 20:51:34 +08:00
chenjiahan
4bb4a6622f release: @vant/use 1.4.0 2022-05-22 20:50:23 +08:00
neverland
90deb2439f
feat: using mjs entry for sub packages (#10626) 2022-05-22 20:49:09 +08:00
neverland
173a364dae
feat(@vant/cli): support custom script extentions (#10624)
* feat(@vant/cli): support custom script extentions

* fix: extensionsMap
2022-05-22 19:57:16 +08:00
neverland
0c0191332a
feat(@vant/cli): bump husky v8 (#10622)
* feat(@vant/cli): bump husky v8

* chore: fix lint issue
2022-05-22 19:28:34 +08:00
14 changed files with 2768 additions and 2890 deletions

View File

@ -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",

View File

@ -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"

View File

@ -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",

View File

@ -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);
}

View File

@ -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}`;

View File

@ -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',

View File

@ -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": [

View File

@ -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());

View File

@ -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

View File

@ -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": [

View File

@ -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",

View File

@ -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">

View File

@ -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

File diff suppressed because it is too large Load Diff