Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@tarojs/test-utils-vue3": "^0.1.1",
"@tarojs/webpack5-runner": "3.6.24",
"@types/jest": "^29.3.1",
"@types/node": "^18.15.11",
"@types/node": "^18",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/mini-program-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@
"typescript": "^4.1.0",
"postcss": "^8.4.38",
"ts-node": "^10.9.1",
"@types/node": "^18.15.11"
"@types/node": "^18"
}
}
2 changes: 1 addition & 1 deletion examples/taro-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"tsconfig-paths-webpack-plugin": "^4.1.0",
"postcss": "^8.4.38",
"ts-node": "^10.9.1",
"@types/node": "^18.15.11",
"@types/node": "^18",
"@types/jest": "^29.3.1",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.5.0"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"@types/webpack-dev-server": "^3.11.3",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@vitest/coverage-istanbul": "^3.2.3",
"@vitest/coverage-istanbul": "^3.2.4",
"babel-jest": "^29.7.0",
"babel-plugin-syntax-jsx": "6.18.0",
"babel-preset-power-assert": "3.0.0",
Expand Down Expand Up @@ -163,7 +163,7 @@
"ts-node": "^10.9.1",
"tslib": "^2.6.2",
"typescript": "~5.4.5",
"vitest": "^3.2.3"
"vitest": "^3.2.4"
},
"pnpm": {
"packageExtensions": {
Expand Down
6 changes: 5 additions & 1 deletion packages/taro-cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ const DEFAULT_FRAMEWORK = 'react'

export default class CLI {
appPath: string
constructor(appPath) {
constructor(appPath?: string) {
this.appPath = appPath || process.cwd()
const majorVersion = parseInt(process.version.substring(1).split('.')[0], 10)
if (majorVersion < 20) {
console.warn('Taro 将不再支持 Node.js 小于 20 的版本。请升级 Node.js 至 20 或更高版本。')
}
}

run () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"unzip": "^0.1.11"{{/if}}
},
"devDependencies": {
"@types/node": "^18.15.11"
"@types/node": "^18"
}{{#if (eq pluginType "plugin-template") }},
"resolutions": {
"graceful-fs": "^4.2.11"
Expand Down
18 changes: 7 additions & 11 deletions packages/taro-platform-harmony-cpp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,12 @@
"dev": "pnpm run rollup -w",
"ohpm-publish": "pnpm run tsx --files ./scripts/ohpm-publish",
"remove:reference": "pnpm run tsx --files ./scripts/reference",
"rollup": "rollup --config rollup.config.mts --configPlugin @rollup/plugin-typescript --bundleConfigAsCjs",
"rollup": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"tsx": "ts-node --skipIgnore"
},
"dependencies": {
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.4",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^25.0.8",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.7",
"@tarojs/parse-css-to-stylesheet": "^1.1.8",
"@tarojs/react": "workspace:*",
"@tarojs/runner-utils": "workspace:*",
Expand All @@ -49,13 +44,15 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-reconciler": "0.29.0",
"rollup": "^3.29.4",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-node-externals": "^5.1.3",
"rollup-plugin-ts": "^3.4.5",
"scheduler": "^0.23.2"
},
"devDependencies": {
"rollup": "^3.29.4",
"rollup-plugin-dts": "^6.2.1",
"rollup-plugin-node-externals": "^5.1.3",
"@rollup/plugin-commonjs": "^25.0.8",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@tarojs/components": "workspace:*",
"@tarojs/helper": "workspace:*",
Expand All @@ -66,7 +63,6 @@
"@tarojs/shared": "workspace:*",
"@tarojs/taro": "workspace:*",
"@tarojs/vite-runner": "workspace:*",
"@types/node": "^18.19.34",
"@types/conventional-commits-parser": "^3.0.0",
"conventional-commits-parser": "^3.0.0",
"postcss": "^8.4.38",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
import { join } from 'node:path'

import common from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import ts from '@rollup/plugin-typescript'
import fg from 'fast-glob'
import { type InputPluginOption, type RollupOptions, defineConfig } from 'rollup'
import copy from 'rollup-plugin-copy'
import dts from 'rollup-plugin-dts'
import externals from 'rollup-plugin-node-externals'
import ts from 'rollup-plugin-ts'

const cwd = __dirname

// 供 CLI 编译时使用的 Taro 插件入口
const compileConfig: RollupOptions = {
external: [
/^@(system\.|ohos\.|hmscore\/|jd-oh|taro-oh\/)/,
],
input: join(cwd, 'src/index.ts'),
input: 'src/index.ts',
output: {
file: join(cwd, 'dist/index.js'),
file: 'dist/index.js',
format: 'cjs',
sourcemap: false,
exports: 'named'
Expand Down Expand Up @@ -52,9 +49,9 @@ const compileConfig: RollupOptions = {
}

const apiConfig: RollupOptions = {
input: join(cwd, 'src/runtime/apis/index.ts'),
input: 'src/runtime/apis/index.ts',
output: {
file: join(cwd, 'dist/runtime/apischunk/index.js'),
file: 'dist/runtime/apischunk/index.js',
format: 'esm',
sourcemap: false,
exports: 'named'
Expand All @@ -70,16 +67,26 @@ const apiConfig: RollupOptions = {
nodeResolve({
preferBuiltins: false
}),
ts({
transpileOnly: true,
tsconfig: e => ({
...e,
declaration: true,
})
}),
ts(),
common(),
json(),
]
}

export default defineConfig([compileConfig, apiConfig])
const dtsConfigCjs: RollupOptions = {
input: 'src/index.ts',
output: {
file: 'dist/index.d.ts',
},
plugins: [dts()],
}

const dtsConfigEsm: RollupOptions = {
input: 'src/runtime/apis/index.ts',
output: {
file: 'dist/runtime/apischunk/index.d.ts',
},
plugins: [dts()],
}

export default defineConfig([compileConfig, apiConfig, dtsConfigCjs, dtsConfigEsm])
2 changes: 1 addition & 1 deletion packages/taro-platform-harmony-cpp/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"strictNullChecks": true,
"target": "ES2021"
},
"include": ["./scripts", "./src", "./types", "./cpp/types", "./rollup.config.mts"],
"include": ["./scripts", "./src", "./types", "./cpp/types", "./rollup.config.ts"],
"ts-node": {
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2328,6 +2328,10 @@
},
"lifestyle": false,
"like": false,
"list": {
"upper-threshold-count": false,
"lower-threshold-count": false
},
"list-builder": {
"type": {
"static": false,
Expand All @@ -2338,6 +2342,7 @@
"child-height": false,
"padding": false
},
"list-item": false,
"list-view": {
"padding": false
},
Expand Down
1 change: 0 additions & 1 deletion packages/taro-platform-harmony-hybrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@tarojs/taro": "workspace:*",
"@types/node": "^14.14.31",
"fast-glob": "^3.3.1",
"lodash": "^4.17.21",
"rollup": "^3.29.4",
Expand Down
1 change: 0 additions & 1 deletion packages/taro-plugin-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"@types/babel__generator": "^7.6.8",
"@types/babel__traverse": "^7.20.5",
"@types/inquirer": "^8.2.1",
"@types/node": "^18.15.11",
"typescript": "~5.4.5"
}
}
Loading