@talknote/create-talknote-h5 0.1.1 → 0.1.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
@@ -4,7 +4,7 @@
4
4
  "access": "public",
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
7
- "version": "0.1.1",
7
+ "version": "0.1.2",
8
8
  "description": "Create a Talknote Alita H5 project.",
9
9
  "license": "MIT",
10
10
  "private": false,
@@ -3,8 +3,6 @@ module.exports = {
3
3
  rules: {
4
4
  'import/order': ['warn', { groups: ['builtin', 'external', 'internal'] }],
5
5
  'no-use-before-define': ['warn', { functions: true, classes: true, variables: true }],
6
- 'react-native/no-inline-styles': 'warn',
7
- 'react-native/no-unused-styles': 'error',
8
6
  'global-require': 'off',
9
7
  'no-empty': ['warn', { allowEmptyCatch: false }],
10
8
  },
@@ -0,0 +1 @@
1
+ npx lint-staged
@@ -3,23 +3,17 @@
3
3
  "private": true,
4
4
  "scripts": {
5
5
  "build": "alita build",
6
+ "prepare": "husky install",
6
7
  "dev": "node scripts/dev.js",
7
8
  "format": "prettier --write .",
9
+ "eslint": "eslint --ext='.js,.jsx,.ts,.tsx' .",
8
10
  "lint-staged": "lint-staged",
9
11
  "lint-staged:js": "eslint --ext .ts,.tsx",
10
12
  "plugin": "alita plugin list",
11
13
  "start": "node scripts/dev.js",
14
+ "postinstall": "patch-package",
12
15
  "test": "jest"
13
16
  },
14
- "lint-staged": {
15
- "**/*.less": "stylelint --syntax less",
16
- "**/*.css": "stylelint --syntax css",
17
- "**/*.{ts,tsx}": "npm run lint-staged:js",
18
- "**/*.{ts,tsx,json,jsx,less}": [
19
- "git add",
20
- "prettier --write"
21
- ]
22
- },
23
17
  "dependencies": {
24
18
  "@talknote/h5-bridge":"^0.0.4",
25
19
  "@alita/flow": "^3.1.1",
@@ -29,7 +23,10 @@
29
23
  "react-dom": "^18.2.0"
30
24
  },
31
25
  "devDependencies": {
26
+ "patch-package": "^8.0.0",
32
27
  "@whalecloud/eslint-config": "0.0.41",
28
+ "eslint": "^8.19.0",
29
+ "husky": "^9.1.7",
33
30
  "@testing-library/jest-dom": "^5.16.4",
34
31
  "@testing-library/react": "^13.4.0",
35
32
  "@types/jest": "^27.5.2",
@@ -42,10 +39,12 @@
42
39
  "typescript": "^5.2.2"
43
40
  },
44
41
  "engines": {
45
- "node": ">=14.0.1"
42
+ "node": ">=18"
43
+ },
44
+ "lint-staged": {
45
+ "*.{js,jsx,ts,tsx}": "eslint"
46
46
  },
47
47
  "gitHooks": {
48
- "pre-commit": "lint-staged",
49
- "commit-msg": "alita verify-commit"
48
+ "pre-commit": "lint-staged"
50
49
  }
51
50
  }
@@ -0,0 +1,36 @@
1
+ diff --git a/node_modules/http-deceiver/lib/deceiver.js b/node_modules/http-deceiver/lib/deceiver.js
2
+ index 33e14cb..520e124 100644
3
+ --- a/node_modules/http-deceiver/lib/deceiver.js
4
+ +++ b/node_modules/http-deceiver/lib/deceiver.js
5
+ @@ -19,12 +19,29 @@ var kOnHeadersComplete;
6
+ var kOnMessageComplete;
7
+ var kOnBody;
8
+ if (mode === 'normal' || mode === 'modern') {
9
+ - HTTPParser = process.binding('http_parser').HTTPParser;
10
+ + var __hp;
11
+ + try {
12
+ + __hp = process.binding('http_parser');
13
+ + } catch (e) {
14
+ + // Node >= 12 removed process.binding('http_parser') (replaced by llhttp).
15
+ + // spdy/http-deceiver only back the optional HTTP/2 dev server, which this
16
+ + // project never starts, so stub the parser instead of crashing on require.
17
+ + var StubHTTPParser = function() {};
18
+ + StubHTTPParser.methods = ['DELETE','GET','HEAD','POST','PUT','CONNECT','OPTIONS','TRACE'];
19
+ + StubHTTPParser.REQUEST = 0;
20
+ + StubHTTPParser.RESPONSE = 1;
21
+ + StubHTTPParser.kOnHeaders = 0;
22
+ + StubHTTPParser.kOnHeadersComplete = 1;
23
+ + StubHTTPParser.kOnBody = 2;
24
+ + StubHTTPParser.kOnMessageComplete = 3;
25
+ + __hp = { HTTPParser: StubHTTPParser, methods: StubHTTPParser.methods };
26
+ + }
27
+ + HTTPParser = __hp.HTTPParser;
28
+ methods = HTTPParser.methods;
29
+
30
+ // v6
31
+ if (!methods)
32
+ - methods = process.binding('http_parser').methods;
33
+ + methods = __hp.methods;
34
+
35
+ reverseMethods = {};
36
+