@spcsn/taro-helper 0.1.1 → 1.0.0

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/package.json CHANGED
@@ -1,14 +1,26 @@
1
1
  {
2
2
  "name": "@spcsn/taro-helper",
3
- "version": "0.1.1",
4
- "description": "Taro Helper",
5
- "author": "O2Team",
3
+ "version": "1.0.0",
4
+ "description": "SPCSN Taro helper utilities",
5
+ "author": "Samuel Ouyang",
6
6
  "license": "MIT",
7
7
  "main": "index.js",
8
8
  "types": "dist/index.d.ts",
9
+ "scripts": {
10
+ "prod": "pnpm run build",
11
+ "clean": "bun ../../scripts/clean.ts dist",
12
+ "prebuild": "pnpm run clean",
13
+ "build": "tsc",
14
+ "postbuild": "pnpm run swc:backup",
15
+ "dev": "tsc -w",
16
+ "prepack": "pnpm run build",
17
+ "test": "vitest run",
18
+ "test:ci": "vitest run --coverage",
19
+ "swc:backup": "bun scripts/backup.ts"
20
+ },
9
21
  "repository": {
10
22
  "type": "git",
11
- "url": "git+https://github.com/NervJS/taro.git"
23
+ "url": "git+https://github.com/specificshen/taro-lite.git"
12
24
  },
13
25
  "files": [
14
26
  "index.js",
@@ -20,51 +32,33 @@
20
32
  "taro"
21
33
  ],
22
34
  "bugs": {
23
- "url": "https://github.com/NervJS/taro/issues"
35
+ "url": "https://github.com/specificshen/taro-lite/issues"
24
36
  },
25
37
  "engines": {
26
38
  "node": ">= 22"
27
39
  },
28
- "homepage": "https://github.com/NervJS/taro#readme",
40
+ "homepage": "https://github.com/specificshen/taro-lite#readme",
29
41
  "dependencies": {
30
42
  "@babel/core": "^7.24.4",
31
- "@babel/generator": "^7.24.4",
32
- "@babel/parser": "^7.24.4",
33
- "@babel/traverse": "^7.24.1",
34
- "@babel/types": "^7.24.0",
35
43
  "@swc/core": "1.3.96",
36
44
  "@swc/register": "0.1.10",
37
- "ansi-escapes": "^4.3.2",
38
- "chalk": "^4.1.2",
45
+ "chalk": "^5.6.2",
39
46
  "chokidar": "^3.6.0",
40
47
  "cross-spawn": "^7.0.3",
41
48
  "debug": "^4.3.4",
42
49
  "dotenv": "^16.4.5",
43
50
  "dotenv-expand": "^11.0.6",
44
- "esbuild": "~0.21.0",
45
- "find-yarn-workspace-root": "^2.0.0",
46
- "fs-extra": "^11.2.0",
47
51
  "lodash": "^4.17.21",
48
- "require-from-string": "^2.0.2",
49
- "resolve": "^1.22.8",
50
- "supports-hyperlinks": "^3.0.0"
52
+ "resolve": "^1.22.8"
51
53
  },
52
54
  "devDependencies": {
55
+ "@spcsn/taro": "workspace:*",
53
56
  "@types/babel__core": "^7.20.5",
54
- "@types/babel__generator": "^7.6.8",
55
- "@types/babel__traverse": "^7.20.5",
56
- "@spcsn/taro": "0.1.2"
57
- },
58
- "scripts": {
59
- "prod": "pnpm run build",
60
- "clean": "rimraf dist",
61
- "prebuild": "pnpm run clean",
62
- "build": "tsc || true",
63
- "postbuild": "pnpm run swc:backup",
64
- "dev": "tsc -w",
65
- "test": "jest --collectCoverage",
66
- "test:ci": "jest --ci -i --coverage --silent",
67
- "artifacts": "node scripts/artifacts.js",
68
- "swc:backup": "node scripts/backup.js"
57
+ "@types/debug": "^4.1.5",
58
+ "@types/node": "^22.19.19",
59
+ "@types/resolve": "^1.20.6",
60
+ "@vitest/coverage-istanbul": "^3.2.4",
61
+ "typescript": "~6.0.3",
62
+ "vitest": "^3.2.4"
69
63
  }
70
- }
64
+ }
File without changes
File without changes
File without changes
package/LICENSE DELETED
@@ -1,174 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 O2Team
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
23
- ========================================================================
24
-
25
- MIT (react-devtools):
26
- The following files embed [react-devtools](https://github.com/facebook/react) MIT:
27
- `/packages/taro-plugin-react-devtools/src/backend/index.js`
28
- See `/LICENSE` for details of the license.
29
-
30
- ==================
31
-
32
- MIT (vue-devtools):
33
- The following files embed [vue-devtools](https://github.com/vuejs/devtools) MIT:
34
- `/packages/taro-plugin-vue-devtools/src/backend/*`
35
- See `/LICENSE` for details of the license.
36
-
37
- ==================
38
-
39
- MIT (vite):
40
- The following files embed [vite](https://github.com/vitejs/vite) MIT:
41
- `/packages/taro-webpack5-prebundle/src/prebundle/scanImport.ts`,
42
- `/packages/taro-webpack5-prebundle/src/prebundle/bundle.ts`,
43
- `/packages/taro-webpack5-prebundle/src/h5.ts`,
44
- `/packages/taro-webpack5-prebundle/src/min.ts`
45
- See `/LICENSE` for details of the license.
46
-
47
- ==================
48
-
49
- MIT (webpack):
50
- The following files embed [webpack](https://github.com/webpack/webpack) MIT:
51
- `/packages/taro-webpack5-prebundle/src/webpack/TaroContainerEntryModule.ts`,
52
- `/packages/taro-webpack5-prebundle/src/webpack/TaroContainerPlugin.ts`,
53
- `/packages/taro-webpack5-prebundle/src/webpack/TaroContainerReferencePlugin.ts`,
54
- `/packages/taro-webpack5-prebundle/src/webpack/TaroModuleFederationPlugin.ts`
55
- See `/LICENSE` for details of the license.
56
-
57
- ==================
58
-
59
- MIT (sizzle):
60
- The following files embed [sizzle](https://github.com/jquery/sizzle) MIT:
61
- `/packages/taro-extends/src/jquery/sizzle.js`
62
- See `/LICENSE.txt` for details of the license.
63
-
64
- ==================
65
-
66
- MIT (zepto):
67
- The following files embed [zepto](https://github.com/madrobby/zepto) MIT:
68
- `/packages/taro-extends/src/jquery/zepto.js`,
69
- `/packages/taro-extends/src/jquery/event.js`
70
- See `/MIT-LICENSE` for details of the license.
71
-
72
- ==================
73
-
74
- MIT (css-to-react-native):
75
- The following files embed [css-to-react-native](https://github.com/styled-components/css-to-react-native) MIT:
76
- `/packages/css-to-react-native/src/css-to-react-native/*`
77
- See `/LICENSE.md` for details of the license.
78
-
79
- ==================
80
-
81
- MIT (reactify-wc):
82
- The following files embed [reactify-wc](https://github.com/BBKolton/reactify-wc) MIT:
83
- `/packages/taro-components-library-react/src/component-lib/reactify-wc.ts`
84
- See `/LICENSE` for details of the license.
85
-
86
- ==================
87
-
88
- MIT (ant-design-mobile-rn):
89
- The following files embed [ant-design-mobile-rn](https://github.com/ant-design/ant-design-mobile-rn) MIT:
90
- `/packages/taro-components-rn/src/components/Swiper/carousel.tsx`
91
- See `/LICENSE` for details of the license.
92
-
93
- ==================
94
-
95
- MIT (react-wx-images-viewer):
96
- The following files embed [react-wx-images-viewer](https://github.com/react-ld/react-wx-images-viewer) MIT:
97
- `/packages/taro-h5/src/api/media/image/previewImage.ts`
98
- See `/LICENSE` for details of the license.
99
-
100
- ==================
101
-
102
- MIT (webpack-contrib/css-loader):
103
- The following files embed [webpack-contrib/css-loader](https://github.com/webpack-contrib/css-loader) MIT:
104
- `/packages/taro-rn-style-transformer/src/utils/index.ts`
105
- See `/LICENSE` for details of the license.
106
-
107
- ==================
108
-
109
- MIT (react-native):
110
- The following files embed [react-native](https://github.com/facebook/react-native) MIT:
111
- `/packages/taro-rn-style-transformer/src/transforms/StyleSheet/*`
112
- See `/LICENSE` for details of the license.
113
-
114
- ==================
115
-
116
- MIT (myrne/performance-now):
117
- The following files embed [myrne/performance-now](https://github.com/myrne/performance-now) MIT:
118
- `/packages/taro-runtime/src/bom/raf.ts`
119
- See `/LICENSE` for details of the license.
120
-
121
- ==================
122
-
123
- Apache (chameleon-api):
124
- The following files embed [chameleon-api](https://github.com/chameleon-team/chameleon-api) Apache:
125
- `/packages/taro-h5/src/api/device/clipboard.ts`
126
-
127
- ==================
128
-
129
- MIT (uni-app):
130
- The following files embed [uni-app](https://github.com/dcloudio/uni-app) MIT:
131
- `/packages/taro-components-rn/src/components/Video/index.tsx`
132
- See `/LICENSE` for details of the license.
133
-
134
- ==================
135
-
136
- MIT (miniprogram-render):
137
- The following files embed [miniprogram-render](https://github.com/Tencent/kbone) MIT:
138
- `/packages/taro-plugin-http/src/runtime/Cookie.ts`
139
- See `/LICENSE` for details of the license.
140
-
141
- ==================
142
-
143
- MIT (stencil-ds-output-targets):
144
- The following files embed [stencil-ds-output-targets](https://github.com/ionic-team/stencil-ds-output-targets/) MIT:
145
- `/packages/taro-components-library-react/src/react-component-lib/utils/attachProps.ts`
146
- `/packages/taro-components-library-react/src/react-component-lib/utils/case.ts`
147
- `/packages/taro-components-library-react/src/react-component-lib/utils/dev.ts`
148
- `/packages/taro-components-library-react/src/react-component-lib/utils/index.tsx`
149
- `/packages/taro-components-library-react/src/react-component-lib/createComponent.tsx`
150
- `/packages/taro-components-library-react/src/react-component-lib/createOverlayComponent.tsx`
151
- `/packages/taro-components-library-react/src/react-component-lib/interfaces.ts`
152
- `/packages/taro-components-library-vue3/src/vue-component-lib/utils.ts`
153
- See `/LICENSE` for details of the license.
154
-
155
- ==================
156
-
157
- MIT (weui):
158
- The following files embed [weui](https://github.com/Tencent/weui) MIT:
159
- `/packages/taro-components/src/components/*.scss`
160
- See `/LICENSE.txt` for details of the license.
161
-
162
- ==================
163
-
164
- Apache-2.0 (intersection-observer):
165
- The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
166
- `/packages/taro-api/src/polyfill/intersection-observer.ts`
167
- See `/LICENSE.txt` for details of the license.
168
-
169
- ==================
170
-
171
- MIT (babel-plugin-jsx-dom-expressions):
172
- The following files embed [babel-plugin-jsx-dom-expressions](https://github.com/ryansolid/dom-expressions/blob/main/packages/babel-plugin-jsx-dom-expressions) MIT:
173
- `/packages/babel-plugin-transform-solid-jsx/src/*`
174
- See `/LICENSE` for details of the license.
@@ -1,10 +0,0 @@
1
- import type { parse, PluginItem } from '@babel/core';
2
- /**
3
- * Inject `defineAppConfig` and `definePageConfig`
4
- * require header at the top of a config file,
5
- * without the need to specifically require them
6
- * if they are used
7
- */
8
- export declare function injectDefineConfigHeader(babel: {
9
- parse: typeof parse;
10
- }): PluginItem;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.injectDefineConfigHeader = injectDefineConfigHeader;
4
- /**
5
- * Inject `defineAppConfig` and `definePageConfig`
6
- * require header at the top of a config file,
7
- * without the need to specifically require them
8
- * if they are used
9
- */
10
- function injectDefineConfigHeader(babel) {
11
- const appConfig = 'function defineAppConfig(config) { return config }';
12
- const pageConfig = 'function definePageConfig(config) { return config }';
13
- const importNative = "function importNativeComponent(path = '', name = '', exportName = '') { return name }";
14
- const prependHeader = (nodePath, header) => {
15
- const parsedHeader = babel.parse(header, { filename: '' })?.program.body[0];
16
- nodePath.node.body.unshift(parsedHeader);
17
- };
18
- const enterHandler = (nodePath) => {
19
- const { scope, node } = nodePath;
20
- scope.traverse(node, {
21
- CallExpression(p) {
22
- const callee = p.node.callee;
23
- // @ts-ignore
24
- switch (callee.name) {
25
- case 'defineAppConfig':
26
- return prependHeader(nodePath, appConfig);
27
- case 'definePageConfig':
28
- return prependHeader(nodePath, pageConfig);
29
- case 'importNativeComponent':
30
- return prependHeader(nodePath, importNative);
31
- default:
32
- }
33
- },
34
- });
35
- };
36
- return {
37
- visitor: {
38
- Program: { enter: enterHandler },
39
- },
40
- };
41
- }
42
- //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;YACP,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE;SACjC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"swcRegister.js","sourceRoot":"","sources":["../src/swcRegister.ts"],"names":[],"mappings":";;AAKA,oCAwBC;AAxBD,SAAwB,iBAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAA2B;IAClF,MAAM,MAAM,GAAwB;QAClC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACpC,GAAG,EAAE;YACH,MAAM,EAAE;gBACN,MAAM,EAAE,YAAY;gBACpB,UAAU,EAAE,IAAI;aACjB;YACD,SAAS,EAAE;gBACT,eAAe,EAAE,IAAI;aACtB;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,UAAU;SACjB;KACF,CAAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,CAAC,GAAG,CAAC,YAAY,GAAG;YACxB,OAAO;SACR,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
File without changes