@xarc/app-dev 12.0.0 → 13.0.0-beta.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/package.json CHANGED
@@ -1,196 +1,197 @@
1
1
  {
2
- "name": "@xarc/app-dev",
3
- "version": "12.0.0",
4
- "description": "Electrode X application development support",
5
- "main": "lib/index.js",
6
- "homepage": "http://www.electrode.io",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/electrode-io/electrode.git"
10
- },
11
- "bugs": {
12
- "url": "https://github.com/electrode-io/electrode/issues"
13
- },
14
- "license": "Apache-2.0",
15
- "bin": {
16
- "xrun": "bin/xrun.js"
17
- },
18
- "files": [
19
- "config",
20
- "dist",
21
- "lib",
22
- "require.js",
23
- "scripts",
24
- "src"
25
- ],
26
- "author": "Electrode (http://www.electrode.io/)",
27
- "contributors": [
28
- "Joel Chen <xchen@walmartlabs.com>"
29
- ],
30
- "peerDependencies": {
31
- "@xarc/app": "^12.0.0"
32
- },
33
- "dependencies": {
34
- "@babel/cli": "^7.17.10",
35
- "@babel/core": "^7.17.12",
36
- "@babel/plugin-proposal-decorators": "^7.17.12",
37
- "@babel/plugin-transform-class-properties": "^7.24.1",
38
- "@babel/plugin-transform-object-rest-spread": "^7.24.7",
39
- "@babel/plugin-transform-react-constant-elements": "^7.17.12",
40
- "@babel/plugin-transform-react-inline-elements": "^7.16.7",
41
- "@babel/plugin-transform-runtime": "^7.17.12",
42
- "@babel/preset-env": "^7.17.12",
43
- "@babel/preset-react": "^7.17.12",
44
- "@babel/preset-typescript": "^7.17.12",
45
- "@babel/register": "^7.17.7",
46
- "@jchip/redbird": "^1.3.0",
47
- "@xarc/dev-base": "^0.1.3",
48
- "@xarc/run": "^1.0.5",
49
- "@xarc/subapp": "^0.4.2",
50
- "@xarc/webpack": "^12.0.0",
51
- "ansi-to-html": "^0.7.2",
52
- "babel-plugin-lodash": "^3.3.4",
53
- "babel-plugin-minify-dead-code-elimination": "^0.5.2",
54
- "babel-plugin-transform-node-env-inline": "^0.4.3",
55
- "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
56
- "boxen": "^5.0.0",
57
- "chalker": "^1.2.0",
58
- "chokidar": "^3.5.3",
59
- "core-js": "^3.22.5",
60
- "electrode-node-resolver": "^2.0.2",
61
- "fast-async": "^7.0.5",
62
- "filter-scan-dir": "1.5.5",
63
- "fs-extra": "^10.1.0",
64
- "glob": "^9.0.0",
65
- "identity-obj-proxy": "^3.0.0",
66
- "is-ci": "^2.0.0",
67
- "lodash": "^4.17.21",
68
- "log-update": "^5.0.1",
69
- "mime": "^3.0.0",
70
- "mkdirp": "^1.0.4",
71
- "nix-clap": "^1.3.13",
72
- "nyc": "^15.1.0",
73
- "open": "^8.4.0",
74
- "optional-require": "^1.1.8",
75
- "pkg-up": "^3.1.0",
76
- "prompts": "^2.4.2",
77
- "ps-get": "^1.1.0",
78
- "read-pkg-up": "^7.0.1",
79
- "regenerator-runtime": "^0.13.9",
80
- "require-at": "^1.0.6",
81
- "semver": "^7.3.7",
82
- "serve-index-fs": "^1.10.1",
83
- "subapp-util": "^1.1.5",
84
- "sudo-prompt": "^9.2.1",
85
- "tslib": "^2.4.0",
86
- "visual-logger": "^1.1.3",
87
- "webpack-dev-middleware": "^4.1.0",
88
- "webpack-hot-middleware": "^2.25.1",
89
- "winston": "^3.7.2",
90
- "xaa": "^1.7.3",
91
- "xenv-config": "^1.3.1",
92
- "xsh": "^0.4.5"
93
- },
94
- "devDependencies": {
95
- "@babel/core": "^7.11.0",
96
- "@babel/eslint-parser": "^7.25.1",
97
- "@istanbuljs/nyc-config-typescript": "^1.0.2",
98
- "@types/chai": "^4.3.1",
99
- "@types/mocha": "^10.0.1",
100
- "@types/node": "^20.14.10",
101
- "@types/sinon": "^9.0.10",
102
- "@types/sinon-chai": "^3.2.8",
103
- "@types/webpack": "5.28.0",
104
- "@typescript-eslint/eslint-plugin": "^5.0.0",
105
- "@typescript-eslint/parser": "^5.0.0",
106
- "@xarc/app": "^12.0.0",
107
- "@xarc/module-dev": "^4.1.0",
108
- "@xarc/run": "^1.1.1",
109
- "chai": "^4.3.6",
110
- "electrode-server": "^3.3.0",
111
- "electrode-server1": "npm:electrode-server@^1.0.0",
112
- "eslint": "^7.16.0",
113
- "eslint-config-walmart": "^2.2.1",
114
- "eslint-plugin-filenames": "^1.3.2",
115
- "eslint-plugin-jsdoc": "^48.2.7",
116
- "eslint-plugin-tsdoc": "^0.3.0",
117
- "mocha": "^10.2.0",
118
- "mock-require": "^3.0.3",
119
- "nyc": "^15.1.0",
120
- "prettier": "^2.6.2",
121
- "run-verify": "^1.2.6",
122
- "shx": "^0.3.4",
123
- "sinon": "^9.2.2",
124
- "sinon-chai": "^3.7.0",
125
- "source-map-support": "^0.5.21",
126
- "ts-node": "^10.9.1",
127
- "typedoc": "^0.25.13",
128
- "typescript": "^5.4.5"
129
- },
130
- "engines": {
131
- "node": ">= 14",
132
- "npm": ">= 6"
133
- },
134
- "nyc": {
135
- "all": true,
136
- "reporter": [
137
- "lcov",
138
- "text",
139
- "text-summary"
140
- ],
141
- "exclude": [
142
- "*clap.js",
143
- "*clap.ts",
144
- "config",
145
- "coverage",
146
- "dist",
147
- "docs",
148
- "gulpfile.js",
149
- "lib",
150
- "test",
151
- "xrun*.js",
152
- "xrun*.ts"
153
- ],
154
- "check-coverage": false,
155
- "statements": 0,
156
- "branches": 0,
157
- "functions": 0,
158
- "lines": 0,
159
- "cache": true,
160
- "extends": [
161
- "@istanbuljs/nyc-config-typescript"
162
- ]
163
- },
164
- "@xarc/module-dev": {
165
- "srcDir": [
166
- "src",
167
- "test",
168
- "scripts"
169
- ],
170
- "features": [
171
- "eslint",
172
- "eslintTS",
173
- "mocha",
174
- "typedoc",
175
- "typescript"
176
- ]
177
- },
178
- "mocha": {
179
- "require": [
180
- "ts-node/register",
181
- "source-map-support/register",
182
- "@xarc/module-dev/config/test/setup.js"
183
- ],
184
- "recursive": true
185
- },
186
- "scripts": {
187
- "compile": "tsc",
188
- "build": "xrun -s compile user/moveDist",
189
- "lint": "xrun xarc/lint",
190
- "test": "xrun xarc/test-only",
191
- "coverage": "xrun xarc/test-cov",
192
- "check": "xrun xarc/check",
193
- "format": "prettier --write --print-width 100 *.{js,jsx} `find . -type d -d 1 -exec echo '{}/**/*.{js,jsx}' \\; | egrep -v '(/node_modules/|/dist/|/coverage/)'`",
194
- "docs": "xrun xarc/docs"
195
- }
2
+ "name": "@xarc/app-dev",
3
+ "version": "13.0.0-beta.0",
4
+ "description": "Electrode X application development support",
5
+ "main": "lib/index.js",
6
+ "homepage": "http://www.electrode.io",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/electrode-io/electrode.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/electrode-io/electrode/issues"
13
+ },
14
+ "license": "Apache-2.0",
15
+ "scripts": {
16
+ "compile": "tsc",
17
+ "build": "xrun -s compile user/moveDist",
18
+ "lint": "xrun xarc/lint",
19
+ "test": "xrun xarc/test-only",
20
+ "coverage": "xrun xarc/test-cov",
21
+ "check": "xrun xarc/check",
22
+ "format": "prettier --write --print-width 100 *.{js,jsx} `find . -type d -d 1 -exec echo '{}/**/*.{js,jsx}' \\; | egrep -v '(/node_modules/|/dist/|/coverage/)'`",
23
+ "prepublishOnly": "xrun [[build, docs], xarc/check]",
24
+ "docs": "xrun xarc/docs"
25
+ },
26
+ "bin": {
27
+ "xrun": "bin/xrun.js"
28
+ },
29
+ "files": [
30
+ "config",
31
+ "dist",
32
+ "lib",
33
+ "require.js",
34
+ "scripts",
35
+ "src"
36
+ ],
37
+ "author": "Electrode (http://www.electrode.io/)",
38
+ "contributors": [
39
+ "Joel Chen <xchen@walmartlabs.com>"
40
+ ],
41
+ "peerDependencies": {
42
+ "@xarc/app": "^12.0.0"
43
+ },
44
+ "dependencies": {
45
+ "@babel/cli": "^7.17.10",
46
+ "@babel/core": "^7.17.12",
47
+ "@babel/plugin-proposal-decorators": "^7.17.12",
48
+ "@babel/plugin-transform-class-properties": "^7.24.1",
49
+ "@babel/plugin-transform-object-rest-spread": "^7.24.7",
50
+ "@babel/plugin-transform-react-constant-elements": "^7.17.12",
51
+ "@babel/plugin-transform-react-inline-elements": "^7.16.7",
52
+ "@babel/plugin-transform-runtime": "^7.17.12",
53
+ "@babel/preset-env": "^7.17.12",
54
+ "@babel/preset-react": "^7.17.12",
55
+ "@babel/preset-typescript": "^7.17.12",
56
+ "@babel/register": "^7.17.7",
57
+ "@jchip/redbird": "^1.3.0",
58
+ "@xarc/dev-base": "^2.0.0-beta.0",
59
+ "@xarc/run": "^1.0.5",
60
+ "@xarc/subapp": "^1.0.0-beta.0",
61
+ "@xarc/webpack": "^13.0.0-beta.0",
62
+ "ansi-to-html": "^0.7.2",
63
+ "babel-plugin-lodash": "^3.3.4",
64
+ "babel-plugin-minify-dead-code-elimination": "^0.5.2",
65
+ "babel-plugin-transform-node-env-inline": "^0.4.3",
66
+ "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
67
+ "boxen": "^5.0.0",
68
+ "chalker": "^1.2.0",
69
+ "chokidar": "^3.5.3",
70
+ "core-js": "^3.22.5",
71
+ "electrode-node-resolver": "^2.0.2",
72
+ "fast-async": "^7.0.5",
73
+ "filter-scan-dir": "1.5.5",
74
+ "fs-extra": "^10.1.0",
75
+ "glob": "^9.0.0",
76
+ "identity-obj-proxy": "^3.0.0",
77
+ "is-ci": "^2.0.0",
78
+ "lodash": "^4.17.21",
79
+ "log-update": "^5.0.1",
80
+ "mime": "^3.0.0",
81
+ "mkdirp": "^1.0.4",
82
+ "nix-clap": "^1.3.13",
83
+ "nyc": "^15.1.0",
84
+ "open": "^8.4.0",
85
+ "optional-require": "^1.1.8",
86
+ "pkg-up": "^3.1.0",
87
+ "prompts": "^2.4.2",
88
+ "ps-get": "^1.1.0",
89
+ "read-pkg-up": "^7.0.1",
90
+ "regenerator-runtime": "^0.13.9",
91
+ "require-at": "^1.0.6",
92
+ "semver": "^7.3.7",
93
+ "serve-index-fs": "^1.10.1",
94
+ "subapp-util": "^1.1.5",
95
+ "sudo-prompt": "^9.2.1",
96
+ "tslib": "^2.4.0",
97
+ "visual-logger": "^1.1.3",
98
+ "webpack-dev-middleware": "^4.1.0",
99
+ "webpack-hot-middleware": "^2.25.1",
100
+ "winston": "^3.7.2",
101
+ "xaa": "^1.7.3",
102
+ "xenv-config": "^1.3.1",
103
+ "xsh": "^0.4.5"
104
+ },
105
+ "devDependencies": {
106
+ "@babel/core": "^7.11.0",
107
+ "@babel/eslint-parser": "^7.25.1",
108
+ "@istanbuljs/nyc-config-typescript": "^1.0.2",
109
+ "@types/chai": "^4.3.1",
110
+ "@types/mocha": "^10.0.1",
111
+ "@types/node": "^20.14.10",
112
+ "@types/sinon": "^9.0.10",
113
+ "@types/sinon-chai": "^3.2.8",
114
+ "@types/webpack": "5.28.0",
115
+ "@typescript-eslint/eslint-plugin": "^5.0.0",
116
+ "@typescript-eslint/parser": "^5.0.0",
117
+ "@xarc/app": "^12.0.0",
118
+ "@xarc/module-dev": "^4.1.0",
119
+ "@xarc/run": "^1.1.1",
120
+ "chai": "^4.3.6",
121
+ "electrode-server": "^3.3.0",
122
+ "electrode-server1": "npm:electrode-server@^1.0.0",
123
+ "eslint": "^7.16.0",
124
+ "eslint-config-walmart": "^2.2.1",
125
+ "eslint-plugin-filenames": "^1.3.2",
126
+ "eslint-plugin-jsdoc": "^48.2.7",
127
+ "eslint-plugin-tsdoc": "^0.3.0",
128
+ "mocha": "^10.2.0",
129
+ "mock-require": "^3.0.3",
130
+ "nyc": "^15.1.0",
131
+ "prettier": "^2.6.2",
132
+ "run-verify": "^1.2.6",
133
+ "shx": "^0.3.4",
134
+ "sinon": "^9.2.2",
135
+ "sinon-chai": "^3.7.0",
136
+ "source-map-support": "^0.5.21",
137
+ "ts-node": "^10.9.1",
138
+ "typedoc": "^0.25.13",
139
+ "typescript": "^5.4.5"
140
+ },
141
+ "engines": {
142
+ "node": ">= 20",
143
+ "npm": ">= 10"
144
+ },
145
+ "nyc": {
146
+ "all": true,
147
+ "reporter": [
148
+ "lcov",
149
+ "text",
150
+ "text-summary"
151
+ ],
152
+ "exclude": [
153
+ "*clap.js",
154
+ "*clap.ts",
155
+ "config",
156
+ "coverage",
157
+ "dist",
158
+ "docs",
159
+ "gulpfile.js",
160
+ "lib",
161
+ "test",
162
+ "xrun*.js",
163
+ "xrun*.ts"
164
+ ],
165
+ "check-coverage": false,
166
+ "statements": 0,
167
+ "branches": 0,
168
+ "functions": 0,
169
+ "lines": 0,
170
+ "cache": true,
171
+ "extends": [
172
+ "@istanbuljs/nyc-config-typescript"
173
+ ]
174
+ },
175
+ "@xarc/module-dev": {
176
+ "srcDir": [
177
+ "src",
178
+ "test",
179
+ "scripts"
180
+ ],
181
+ "features": [
182
+ "eslint",
183
+ "eslintTS",
184
+ "mocha",
185
+ "typedoc",
186
+ "typescript"
187
+ ]
188
+ },
189
+ "mocha": {
190
+ "require": [
191
+ "ts-node/register",
192
+ "source-map-support/register",
193
+ "@xarc/module-dev/config/test/setup.js"
194
+ ],
195
+ "recursive": true
196
+ }
196
197
  }
@@ -20,14 +20,6 @@ require("regenerator-runtime/runtime");
20
20
  */
21
21
  /*globals window:false*/
22
22
 
23
- /**
24
- * Install enzyme along with an Adapter corresponding to React 16
25
- * Configure enzyme to use the adapter using the top level configure(...) API
26
- */
27
- var enzyme = require("@xarc/opt-karma/lib/enzyme");
28
- var Adapter = require("@xarc/opt-karma/lib/enzyme-adapter-react-16");
29
- enzyme.configure({ adapter: new Adapter() });
30
-
31
23
  /*
32
24
  * We need a global sinon to maintain compatibility
33
25
  * with existing test suites. However, this will be
@@ -61,7 +53,11 @@ window.mocha.setup({
61
53
  // Use webpack to include all app code _except_ the entry point so we can get
62
54
  // code coverage in the bundle, whether tested or not.
63
55
  // NOTE: No need to specify src even in src mode since webpack should handle that already
64
- var srcReq = require.context("client", true, /^((?!app).)(!(spec|test))*\.(jsx|js)?$/);
56
+ var srcReq = require.context(
57
+ "client",
58
+ true,
59
+ /^((?!app).)(!(spec|test))*\.(jsx|js)?$/
60
+ );
65
61
  srcReq.keys().map(srcReq);
66
62
 
67
63
  // Use webpack to infer and `require` tests automatically only for test/client
@@ -20,14 +20,6 @@ require("regenerator-runtime/runtime");
20
20
  */
21
21
  /*globals window:false*/
22
22
 
23
- /**
24
- * Install enzyme along with an Adapter corresponding to React 16
25
- * Configure enzyme to use the adapter using the top level configure(...) API
26
- */
27
- var enzyme = require("enzyme");
28
- var Adapter = require("enzyme-adapter-react-16");
29
- enzyme.configure({ adapter: new Adapter() });
30
-
31
23
  /*
32
24
  * We need a global sinon to maintain compatibility
33
25
  * with existing test suites. However, this will be
@@ -61,7 +53,11 @@ window.mocha.setup({
61
53
  // Use webpack to include all app code _except_ the entry point so we can get
62
54
  // code coverage in the bundle, whether tested or not.
63
55
  // NOTE: No need to specify src even in src mode since webpack should handle that already
64
- var srcReq = require.context("client", true, /^((?!app).)(!(spec|test))*\.(jsx|js)?$/);
56
+ var srcReq = require.context(
57
+ "client",
58
+ true,
59
+ /^((?!app).)(!(spec|test))*\.(jsx|js)?$/
60
+ );
65
61
  srcReq.keys().map(srcReq);
66
62
 
67
63
  // Use webpack to infer and `require` tests automatically only for test/client
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ require: ["@xarc/app-dev/config/mocha/setup.js", "@babel/register"],
3
+ reporter: "spec",
4
+ spec: "@(__test__|__tests__|test|tests)/**/*.@(js|jsx|ts|tsx)",
5
+ recursive: true,
6
+ ui: "bdd",
7
+ };
@@ -1,14 +1,17 @@
1
1
  import { makeOptionalRequire } from "optional-require";
2
2
  const optionalRequire = makeOptionalRequire(require);
3
3
 
4
- const Enzyme = optionalRequire("enzyme");
5
- const Adapter = optionalRequire("enzyme-adapter-react-16");
4
+ const jsDomGlobal = optionalRequire("jsdom-global");
5
+ const tsNode = optionalRequire("ts-node");
6
6
 
7
- if (Enzyme && Adapter) {
8
- Enzyme.configure({ adapter: new Adapter() });
7
+ if (jsDomGlobal) {
8
+ require("jsdom-global/register");
9
9
  }
10
10
 
11
- const chai = optionalRequire("chai");
11
+ if (tsNode) {
12
+ require("ts-node/register");
13
+ }
14
+ const chai = optionalRequire("chai").default;
12
15
 
13
16
  /**
14
17
  * @param addons