create-rezor 0.3.0 → 0.3.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rezor",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "description": "Rezor 脚手架",
6
6
  "bin": {
@@ -27,12 +27,12 @@
27
27
  "devDependencies": {
28
28
  "@eslint/js": "^10.0.1",
29
29
  "@types/ejs": "^3.1.5",
30
- "@types/node": "^26.4.0",
30
+ "@types/node": "^26.4.1",
31
31
  "@types/prompts": "^2.4.9",
32
32
  "eslint": "^10.9.1",
33
33
  "prettier": "^3.9.6",
34
34
  "typescript": "^6.0.3",
35
- "typescript-eslint": "^8.68.0"
35
+ "typescript-eslint": "^8.69.0"
36
36
  },
37
37
  "scripts": {
38
38
  "format": "prettier --check \"**/*.{js,ts,json,md}\"",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^8.0.0",
30
- "rezor": "^0.6.0",
30
+ "rezor": "^0.6.1",
31
31
  trailing-comma
32
32
  },
33
33
  "devDependencies": {
@@ -47,7 +47,7 @@
47
47
  "@rollup/plugin-replace": "^6.0.3",
48
48
  "@rollup/plugin-terser": "^1.0.0",
49
49
  <%_ if (needsTypeScript && needsVitest) { _%>
50
- "@types/node": "^26.4.0",
50
+ "@types/node": "^26.4.1",
51
51
  <%_ } _%>
52
52
  <%_ if (needsVitest) { _%>
53
53
  "@vitest/coverage-v8": "^4.1.11",
@@ -66,7 +66,7 @@
66
66
  <%_ } _%>
67
67
  "fs-extra": "^11.4.0",
68
68
  <%_ if (needsEslint) { _%>
69
- "globals": "^17.11.0",
69
+ "globals": "^17.12.0",
70
70
  <%_ } _%>
71
71
  "kolorist": "^1.8.0",
72
72
  "local-pkg": "^1.2.1",
@@ -86,7 +86,7 @@
86
86
  "typescript": "^6.0.3",
87
87
  <%_ } _%>
88
88
  <%_ if (needsTypeScript && needsEslint) { _%>
89
- "typescript-eslint": "^8.68.0",
89
+ "typescript-eslint": "^8.69.0",
90
90
  <%_ } _%>
91
91
  <%_ if (needsVitest) { _%>
92
92
  "vitest": "^4.1.11",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @version v0.3.0
2
+ * @version v0.3.2
3
3
  * https://github.com/rezorjs/create-rezor
4
4
  * 请谨慎修改此文件,改动过多可能会导致你后续升级困难。
5
5
  */
@@ -1,10 +1,10 @@
1
- import { createApp, useState, useContext, useThemeChange } from 'rezor';
1
+ import { createApp, useState, useGlobalContext, useThemeChange } from 'rezor';
2
2
  import { ThemeContext } from './contexts/theme';
3
3
 
4
4
  createApp(() => {
5
5
  const [theme, setTheme] = useState(wx.getAppBaseInfo().theme);
6
6
 
7
- useContext(ThemeContext, theme);
7
+ useGlobalContext(ThemeContext, theme);
8
8
 
9
9
  useThemeChange((result) => {
10
10
  setTheme(result.theme);
@@ -1,3 +1,3 @@
1
- import { createContext } from 'rezor';
1
+ import { createGlobalContext } from 'rezor';
2
2
 
3
- export const ThemeContext = createContext('light');
3
+ export const ThemeContext = createGlobalContext('light');
@@ -1,8 +1,8 @@
1
- import { defineComponent, useContext, useState } from 'rezor';
1
+ import { defineComponent, useGlobalContext, useState } from 'rezor';
2
2
  import { ThemeContext } from '@/contexts/theme';
3
3
 
4
4
  defineComponent(() => {
5
- const theme = useContext(ThemeContext);
5
+ const theme = useGlobalContext(ThemeContext);
6
6
  const [count, setCount] = useState(0);
7
7
 
8
8
  const themeText = theme === 'light' ? '浅色' : '深色';
@@ -1,8 +1,8 @@
1
- import { defineComponent, useContext, useState } from 'rezor';
1
+ import { defineComponent, useGlobalContext, useState } from 'rezor';
2
2
  import { ThemeContext } from '@/contexts/theme';
3
3
 
4
4
  defineComponent(() => {
5
- const theme = useContext(ThemeContext);
5
+ const theme = useGlobalContext(ThemeContext);
6
6
  const [count, setCount] = useState(0);
7
7
 
8
8
  const themeText = theme === 'light' ? '浅色' : '深色';
@@ -1,8 +1,8 @@
1
- import { defineComponent, useContext, useState } from 'rezor';
1
+ import { defineComponent, useGlobalContext, useState } from 'rezor';
2
2
  import { ThemeContext } from '@/contexts/theme';
3
3
 
4
4
  defineComponent((_, context) => {
5
- const theme = useContext(ThemeContext);
5
+ const theme = useGlobalContext(ThemeContext);
6
6
  const [count, setCount] = useState(0);
7
7
 
8
8
  const themeText = theme === 'light' ? '浅色' : '深色';
@@ -1,8 +1,8 @@
1
- import { defineComponent, useContext, useState } from 'rezor';
1
+ import { defineComponent, useGlobalContext, useState } from 'rezor';
2
2
  import { ThemeContext } from '@/contexts/theme';
3
3
 
4
4
  defineComponent((_, context) => {
5
- const theme = useContext(ThemeContext);
5
+ const theme = useGlobalContext(ThemeContext);
6
6
  const [count, setCount] = useState(0);
7
7
 
8
8
  const themeText = theme === 'light' ? '浅色' : '深色';
@@ -1,8 +1,8 @@
1
- import { defineComponent, useContext, useState } from 'rezor';
1
+ import { defineComponent, useGlobalContext, useState } from 'rezor';
2
2
  import { ThemeContext } from '@/contexts/theme';
3
3
 
4
4
  defineComponent((_, context) => {
5
- const theme = useContext(ThemeContext);
5
+ const theme = useGlobalContext(ThemeContext);
6
6
  const [count, setCount] = useState(0);
7
7
 
8
8
  const themeText = theme === 'light' ? '浅色' : '深色';
@@ -1,8 +1,8 @@
1
- import { defineComponent, useContext, useState } from 'rezor';
1
+ import { defineComponent, useGlobalContext, useState } from 'rezor';
2
2
  import { ThemeContext } from '@/contexts/theme';
3
3
 
4
4
  defineComponent((_, context) => {
5
- const theme = useContext(ThemeContext);
5
+ const theme = useGlobalContext(ThemeContext);
6
6
  const [count, setCount] = useState(0);
7
7
 
8
8
  const themeText = theme === 'light' ? '浅色' : '深色';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @version v0.3.0
2
+ * @version v0.3.2
3
3
  * https://github.com/rezorjs/create-rezor
4
4
  * 请谨慎修改此文件,改动过多可能会导致你后续升级困难。
5
5
  */
@@ -1,10 +1,10 @@
1
- import { createApp, useState, useContext, useThemeChange } from 'rezor';
1
+ import { createApp, useState, useGlobalContext, useThemeChange } from 'rezor';
2
2
  import { ThemeContext } from './contexts/theme';
3
3
 
4
4
  createApp(() => {
5
5
  const [theme, setTheme] = useState(wx.getAppBaseInfo().theme!);
6
6
 
7
- useContext(ThemeContext, theme);
7
+ useGlobalContext(ThemeContext, theme);
8
8
 
9
9
  useThemeChange((result) => {
10
10
  setTheme(result.theme);
@@ -1,3 +1,3 @@
1
- import { createContext } from 'rezor';
1
+ import { createGlobalContext } from 'rezor';
2
2
 
3
- export const ThemeContext = createContext<'light' | 'dark'>('light');
3
+ export const ThemeContext = createGlobalContext<'light' | 'dark'>('light');
@@ -1,8 +1,8 @@
1
- import { defineComponent, useContext, useState } from 'rezor';
1
+ import { defineComponent, useGlobalContext, useState } from 'rezor';
2
2
  import { ThemeContext } from '@/contexts/theme';
3
3
 
4
4
  defineComponent(() => {
5
- const theme = useContext(ThemeContext);
5
+ const theme = useGlobalContext(ThemeContext);
6
6
  const [count, setCount] = useState(0);
7
7
 
8
8
  const themeText = theme === 'light' ? '浅色' : '深色';
@@ -1,8 +1,8 @@
1
- import { defineComponent, useContext, useState } from 'rezor';
1
+ import { defineComponent, useGlobalContext, useState } from 'rezor';
2
2
  import { ThemeContext } from '@/contexts/theme';
3
3
 
4
4
  defineComponent(() => {
5
- const theme = useContext(ThemeContext);
5
+ const theme = useGlobalContext(ThemeContext);
6
6
  const [count, setCount] = useState(0);
7
7
 
8
8
  const themeText = theme === 'light' ? '浅色' : '深色';
@@ -3,5 +3,4 @@ node_modules
3
3
  coverage
4
4
  dist
5
5
  *.log*
6
- .vscode
7
- .idea
6
+ project.private.config.json
@@ -3,5 +3,4 @@ node_modules
3
3
  coverage
4
4
  dist
5
5
  *.log*
6
- .vscode
7
- .idea
6
+ project.private.config.json