uniweb 0.12.20 → 0.12.22

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/src/versions.js CHANGED
@@ -76,9 +76,16 @@ function getFrameworkRoot() {
76
76
 
77
77
  /**
78
78
  * Read the current on-disk version of a specific `@uniweb/*` package by
79
- * looking up `framework/<last-segment>/package.json`. Returns a caret
80
- * range string like `^0.6.0`, or null if the package isn't present on
81
- * disk (i.e. the CLI is running from npm, not from the workspace).
79
+ * looking up `framework/<last-segment>/package.json`. Returns the version
80
+ * string verbatim (e.g. `0.7.11`), or null if the package isn't present
81
+ * on disk (i.e. the CLI is running from npm, not from the workspace).
82
+ *
83
+ * Returns the version *exact*, not as a caret range, to match the shape
84
+ * published-CLI direct deps take after pnpm resolves `workspace:*` at
85
+ * publish time. Both modes converge on identical specs in
86
+ * `getResolvedVersions()`, so `uniweb update` and the scaffolder produce
87
+ * the same `package.json` whether the CLI ran from npm or from this
88
+ * monorepo.
82
89
  */
83
90
  function readWorkspaceVersion(packageName) {
84
91
  const root = getFrameworkRoot()
@@ -90,7 +97,7 @@ function readWorkspaceVersion(packageName) {
90
97
  try {
91
98
  const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'))
92
99
  if (pkg.name === packageName && pkg.version) {
93
- return `^${pkg.version}`
100
+ return pkg.version
94
101
  }
95
102
  } catch {}
96
103
  return null
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ dist
3
+ _entry.generated.js
4
+ .DS_Store
5
+ *.local
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ dist
3
+ .uniweb/
4
+ .DS_Store
5
+ *.local
@@ -10,8 +10,8 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
- "@uniweb/runtime": "{{version "@uniweb/runtime"}}",
14
- "{{foundationName}}": "{{foundationPath}}"
13
+ "@uniweb/runtime": "{{version "@uniweb/runtime"}}"{{#if foundationPath}},
14
+ "{{foundationName}}": "{{foundationPath}}"{{/if}}
15
15
  },
16
16
  "devDependencies": {
17
17
  "@tailwindcss/vite": "^4.0.0",
@@ -0,0 +1,33 @@
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build outputs
5
+ dist/
6
+ .uniweb/
7
+
8
+ # Generated entry (regenerated by `uniweb build`; never committed)
9
+ _entry.generated.js
10
+
11
+ # Local mock-cloud state (when running `uniweb publish --local` or
12
+ # the unicloud dev server inside this workspace)
13
+ .unicloud/
14
+
15
+ # Environment
16
+ .env
17
+ .env.local
18
+ .env.*.local
19
+
20
+ # IDE
21
+ .vscode/
22
+ .idea/
23
+ *.swp
24
+ *.swo
25
+
26
+ # OS
27
+ .DS_Store
28
+ Thumbs.db
29
+
30
+ # Logs
31
+ *.log
32
+ npm-debug.log*
33
+ pnpm-debug.log*