weifuwu 0.27.28 → 0.28.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/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @deprecated Use `import { ... } from '@weifuwu/core'` instead.
3
+ *
4
+ * Migration:
5
+ * `weifuwu` → `@weifuwu/core` for framework core
6
+ * `weifuwu` → `@weifuwu/react` for React SSR
7
+ */
8
+ export * from '@weifuwu/core'
package/index.js ADDED
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @deprecated weifuwu has been split into scoped packages.
3
+ *
4
+ * Update your imports:
5
+ * import { serve } from 'weifuwu' → import { serve } from '@weifuwu/core'
6
+ * import { ssr, theme } from 'weifuwu' → import { ssr, theme } from '@weifuwu/react'
7
+ *
8
+ * The 'weifuwu' package is a backward-compatibility alias and
9
+ * will receive no new features. Migrate to '@weifuwu/core'.
10
+ */
11
+
12
+ if (!process.env.WEIFUWU_SUPPRESS_DEPRECATION) {
13
+ process.emitWarning(
14
+ [
15
+ `'weifuwu' is deprecated. Use scoped packages instead:`,
16
+ ` import { serve } from 'weifuwu' → import { serve } from '@weifuwu/core'`,
17
+ ` import { ssr } from 'weifuwu' → import { ssr } from '@weifuwu/react'`,
18
+ ` import { aiProvider } from 'weifuwu' → npm install ai (use vercel/ai-sdk directly)`,
19
+ `Set WEIFUWU_SUPPRESS_DEPRECATION=1 to silence this warning.`,
20
+ ].join('\n'),
21
+ 'DeprecationWarning',
22
+ 'WEIFUWU_DEP001',
23
+ )
24
+ }
25
+
26
+ export * from '@weifuwu/core'
package/package.json CHANGED
@@ -1,62 +1,19 @@
1
1
  {
2
2
  "name": "weifuwu",
3
3
  "type": "module",
4
- "version": "0.27.28",
5
- "description": "Web-standard HTTP microframework for Node.js (req, ctx) => Response",
4
+ "version": "0.28.0",
5
+ "description": "Web-standard HTTP microframework — alias for @weifuwu/core",
6
6
  "exports": {
7
7
  ".": {
8
- "types": "./dist/index.d.ts",
9
- "default": "./dist/index.js"
8
+ "types": "./index.d.ts",
9
+ "default": "./index.js"
10
10
  }
11
11
  },
12
- "bin": {
13
- "weifuwu": "./dist/cli.js"
14
- },
15
- "files": [
16
- "dist/",
17
- "README.md"
18
- ],
19
- "scripts": {
20
- "build": "node scripts/build.mjs",
21
- "prepublishOnly": "npm run build && tsc --emitDeclarationOnly --outdir dist",
22
- "typecheck": "tsc --noEmit",
23
- "format": "prettier --write .",
24
- "format:check": "prettier --check .",
25
- "lint": "eslint --ext .ts .",
26
- "test": "node --test 'test/**/*.test.ts'",
27
- "test:coverage": "node --experimental-test-coverage --test 'test/**/*.test.ts'",
28
- "test:quick": "bash scripts/test-quick.sh",
29
- "prepare": "husky"
30
- },
31
12
  "dependencies": {
32
- "@ai-sdk/openai": "^3.0.66",
33
- "@graphql-tools/schema": "^10",
34
- "ai": "^6",
35
- "graphql": "^16",
36
- "ioredis": "^5.11.0",
37
- "postgres": "^3.4.9",
38
- "ws": "^8",
39
- "zod": "^4.4.3"
13
+ "@weifuwu/core": "*"
40
14
  },
41
- "lint-staged": {
42
- "*.ts": [
43
- "prettier --write",
44
- "eslint --fix"
45
- ],
46
- "*.{json,css,md}": [
47
- "prettier --write"
48
- ]
49
- },
50
- "devDependencies": {
51
- "@eslint/js": "^10.0.1",
52
- "@types/node": "^25.9.3",
53
- "@types/ws": "^8.18.1",
54
- "esbuild": "^0.28.0",
55
- "eslint": "^10.5.0",
56
- "globals": "^17.6.0",
57
- "husky": "^9.1.7",
58
- "lint-staged": "^17.0.7",
59
- "prettier": "^3.8.4",
60
- "typescript-eslint": "^8.61.0"
61
- }
15
+ "files": [
16
+ "index.js",
17
+ "index.d.ts"
18
+ ]
62
19
  }