Skip to content

Commit

Permalink
Merge branch '0.0.31'
Browse files Browse the repository at this point in the history
  • Loading branch information
theajack committed Sep 20, 2023
2 parents b3a39e3 + 80c77e0 commit 5afa212
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 65 deletions.
1 change: 0 additions & 1 deletion packages/client-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"web-ui-framework"
],
"license": "MIT",
"type": "module",
"dependencies": {
"alins-reactive": "^0.0.30",
"alins-utils": "^0.0.30"
Expand Down
2 changes: 2 additions & 0 deletions packages/client-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export * from './element/custom-renderer';

export * from 'alins-reactive';

export * from './element/jsx.d';

export const version = __VERSION__;

export { reactiveBindingEnable } from './element/dom-util';
Expand Down
1 change: 0 additions & 1 deletion packages/client-reactive/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"web-ui-framework"
],
"license": "MIT",
"type": "module",
"dependencies": {
"alins-utils": "^0.0.30"
},
Expand Down
7 changes: 5 additions & 2 deletions packages/client-reactive/src/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import {
IJson,
IProxyData,
isStringTemplateArray,
} from 'alins-utils';
import { createProxy, isProxy, wrapReactive } from './proxy';

Expand Down Expand Up @@ -36,6 +35,10 @@ export function react<T extends IJson> (
export function reactive<T extends IJson> (data: T, shallow = false): IProxyData<T> {

if (isProxy(data.v)) return data as any;

// @ts-ignore
return createProxy<T>(wrapReactive(data) as T, { shallow });
}

function isStringTemplateArray (data: any) {
return data instanceof Array && (data as any).raw instanceof Array;
}
1 change: 0 additions & 1 deletion packages/client-standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"web-ui-framework"
],
"license": "MIT",
"type": "module",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
Expand Down
1 change: 0 additions & 1 deletion packages/client-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"web-ui-framework"
],
"license": "MIT",
"type": "module",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
Expand Down
1 change: 0 additions & 1 deletion packages/client-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* @Date: 2022-10-23 18:24:06
* @Description: Coding something
*/
export * from './utils';
export * from './types/symbol';
export { version } from '../package.json';

Expand Down
56 changes: 1 addition & 55 deletions packages/client-utils/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,4 @@
* @Author: tackchen
* @Date: 2022-10-11 16:54:25
* @Description: Coding something
*/
export function join (array: string[], fn: string[] | ((index: number)=>string)) {
let str = '';
for (let i = 0; i < array.length - 1; i++) {
str += `${array[i]}${typeof fn === 'function' ? fn(i) : fn[i]}`;
}
return str + array[array.length - 1];
}

export function delay (time = 0) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(true);
}, time);
});
}

const FuncArgExp = /\(.*?\)/;
export function getFuncArgs (fn: Function) {
return fn.toString().match(FuncArgExp)?.[0] || '';
}

export function isStringTemplateArray (data: any) {
return data instanceof Array && (data as any).raw instanceof Array;
}

export function isObject (data: any) {
return data && typeof data === 'object';
}

export function splitTwoPart (str: string, sep: string) {
const index = str.indexOf(sep);
if (index === -1) return [str, ''];
return [str.substring(0, index).trim(), str.substring(index + 1).trim()];
}

export const isSafari = (() => {
const ua = navigator.userAgent;
return /Safari/.test(ua) && !/Chrome/.test(ua);
})();

export function mergeSet (s1?: Set<any>, s2?: Set<any>): any {
if (!s1) return s2;
if (!s2) return s1;
s2.forEach(item => {s1.add(item);});
return s1;
}

export function assignLast (a1: any[], v: any): void {
a1[a1.length - 1] = v;
}

export function isSimpleValue (v: any) {
return typeof v !== 'object' || v === null;
}
*/
1 change: 0 additions & 1 deletion packages/compiler-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"web-ui-framework"
],
"license": "MIT",
"type": "commonjs",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
Expand Down
1 change: 0 additions & 1 deletion packages/compiler-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"web-ui-framework"
],
"license": "MIT",
"type": "module",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let isWebPackage = false;

const isDev = false;

// npx lerna version v0.0.29 --no-git-tag-version --force-publish --yes
// npx lerna version 0.0.29 --no-git-tag-version --force-publish --yes
// npm run build

function parseBuildConfig () {
Expand Down
6 changes: 6 additions & 0 deletions scripts/helper/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
- [ ] $static、$reactive label支持
- [ ] computed 重构;dirty 标记。优化 const b = a++;

## 0.0.31

- [x] 去除type module
- [x] fix alins jsx declare
- [x] 删除未使用的工具函数

## 0.0.30

- [x] fix alins-standalone
Expand Down

0 comments on commit 5afa212

Please sign in to comment.