@qualtrics/ui-react 0.27.1

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 ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@qualtrics/ui-react",
3
+ "version": "0.27.1",
4
+ "description": "Qualtrics component library designed for React",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.es.js",
7
+ "scripts": {
8
+ "build": "rollup -c",
9
+ "ci": "npm run lint && npm run test && npm run build",
10
+ "lint": "eslint src",
11
+ "lint:fix": "npm run lint -- --fix",
12
+ "postinstall": "node postinstall.js",
13
+ "start": "rollup -c -w",
14
+ "test": "jest"
15
+ },
16
+ "peerDependencies": {
17
+ "react": "^16.8.0",
18
+ "react-dom": "^16.8.0"
19
+ },
20
+ "dependencies": {
21
+ "@qualtrics/component-styles": "^0.30.1",
22
+ "classnames": "^2.2.6",
23
+ "prop-types": "^15.6.2",
24
+ "react-popper": "^1.3.4"
25
+ },
26
+ "devDependencies": {
27
+ "@babel/cli": "^7.5.5",
28
+ "@babel/core": "^7.5.5",
29
+ "@babel/plugin-proposal-class-properties": "^7.5.5",
30
+ "@babel/preset-env": "^7.5.5",
31
+ "@babel/preset-react": "^7.0.0",
32
+ "@testing-library/react": "^8.0.9",
33
+ "babel-loader": "^8.0.6",
34
+ "cross-env": "^5.2.0",
35
+ "eslint": "^5.16.0",
36
+ "eslint-config-airbnb": "^17.1.1",
37
+ "eslint-config-prettier": "^4.3.0",
38
+ "eslint-plugin-import": "^2.18.2",
39
+ "eslint-plugin-jsx-a11y": "^6.2.3",
40
+ "eslint-plugin-prettier": "^3.1.0",
41
+ "eslint-plugin-react": "^7.14.3",
42
+ "eslint-plugin-react-hooks": "^1.7.0",
43
+ "identity-obj-proxy": "^3.0.0",
44
+ "jest": "^24.8.0",
45
+ "jest-dom": "^3.5.0",
46
+ "npm-run-all": "^4.1.5",
47
+ "prettier": "^1.18.2",
48
+ "react": "^16.9.0",
49
+ "react-dom": "^16.9.0",
50
+ "react-test-renderer": "^16.9.0",
51
+ "rollup": "^1.19.4",
52
+ "rollup-plugin-babel": "^4.3.3",
53
+ "rollup-plugin-commonjs": "^9.3.4",
54
+ "rollup-plugin-delete": "^0.2.2",
55
+ "rollup-plugin-json": "^4.0.0",
56
+ "rollup-plugin-modify": "^3.0.0",
57
+ "rollup-plugin-node-resolve": "^4.2.4",
58
+ "rollup-plugin-peer-deps-external": "^2.2.0",
59
+ "rollup-plugin-replace": "^2.2.0",
60
+ "rollup-plugin-terser": "^4.0.4",
61
+ "rollup-plugin-url": "^2.2.2"
62
+ },
63
+ "sideEffects": false,
64
+ "files": [
65
+ "dist",
66
+ "postinstall.js"
67
+ ],
68
+ "publishConfig": {
69
+ "registry": "https://registry.npmjs.org/"
70
+ },
71
+ "prettier": {
72
+ "tabWidth": 4,
73
+ "singleQuote": true,
74
+ "trailingComma": "es5"
75
+ },
76
+ "jest": {
77
+ "collectCoverage": true,
78
+ "collectCoverageFrom": [
79
+ "src/**/*.js",
80
+ "!**/src/utils/**",
81
+ "!**/src/hooks/**",
82
+ "!**/src/Caption/**",
83
+ "!**/src/FormField/**",
84
+ "!**/src/InputGroup/**",
85
+ "!**/src/InlineInput/**",
86
+ "!**/src/ButtonGroup/**"
87
+ ],
88
+ "coverageThreshold": {
89
+ "global": {
90
+ "lines": 80,
91
+ "branches": 80,
92
+ "functions": 80,
93
+ "statements": 80
94
+ }
95
+ }
96
+ }
97
+ }
package/postinstall.js ADDED
@@ -0,0 +1,36 @@
1
+ const path = require('path');
2
+ const http = require('http');
3
+ const fs = require('fs');
4
+ const os = require('os');
5
+ const myPkg = require('./package.json');
6
+
7
+ const fullPath = path.dirname(require.main.filename);
8
+ const match = /^(.*?)\/node_modules/.exec(fullPath);
9
+ const appRoot = match ? match[1] : fullPath;
10
+ const packagePath = `${appRoot}/package.json`;
11
+ const pkg = JSON.parse(fs.readFileSync(packagePath));
12
+
13
+ const requestBody = JSON.stringify({
14
+ installedPackage: myPkg.name,
15
+ installedVersion: myPkg.version,
16
+ name: pkg.name,
17
+ description: pkg.description,
18
+ repository: pkg.repository,
19
+ user: os.userInfo().username,
20
+ });
21
+
22
+ const options = {
23
+ hostname: 'cfe1-app.eng.qops.net',
24
+ port: 9000,
25
+ path: '/ui-auditor/entries',
26
+ method: 'POST',
27
+ headers: {
28
+ 'Content-Type': 'application/json; charset=utf-8',
29
+ 'Content-Length': requestBody.length,
30
+ },
31
+ };
32
+
33
+ const request = http.request(options);
34
+ request.on('error', () => {});
35
+ request.write(requestBody);
36
+ request.end();