@zextras/carbonio-design-system 0.3.10 → 0.4.0-devel.1663244158706

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/jest.config.ts ADDED
@@ -0,0 +1,192 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2021 Zextras <https://www.zextras.com>
3
+ *
4
+ * SPDX-License-Identifier: AGPL-3.0-only
5
+ */
6
+
7
+ // For a detailed explanation regarding each configuration property, visit:
8
+ // https://jestjs.io/docs/en/configuration.html
9
+
10
+ export default {
11
+ // All imported modules in your tests should be mocked automatically
12
+ // automock: false,
13
+
14
+ // Stop running tests after `n` failures
15
+ // bail: 0,
16
+
17
+ // Respect "browser" field in package.json when resolving modules
18
+ // browser: false,
19
+
20
+ // The directory where Jest should store its cached dependency information
21
+ // cacheDirectory: "/tmp/jest_rt",
22
+
23
+ // Automatically clear mock calls and instances between every test
24
+ clearMocks: true,
25
+
26
+ // Indicates whether the coverage information should be collected while executing the test
27
+ collectCoverage: true,
28
+
29
+ // An array of glob patterns indicating a set of files for which coverage information should be collected
30
+ // collectCoverageFrom: undefined,
31
+
32
+ // The directory where Jest should output its coverage files
33
+ coverageDirectory: 'coverage',
34
+
35
+ // An array of regexp pattern strings used to skip coverage collection
36
+ coveragePathIgnorePatterns: ['/node_modules/', '/src/icons/'],
37
+
38
+ // A list of reporter names that Jest uses when writing coverage reports
39
+ coverageReporters: [
40
+ 'text',
41
+ // "json",
42
+ // "lcov",
43
+ // "clover",
44
+ 'cobertura'
45
+ ],
46
+
47
+ // An object that configures minimum threshold enforcement for coverage results
48
+ // coverageThreshold: undefined,
49
+
50
+ // A path to a custom dependency extractor
51
+ // dependencyExtractor: undefined,
52
+
53
+ // Make calling deprecated APIs throw helpful error messages
54
+ // errorOnDeprecated: false,
55
+
56
+ // Force coverage collection from ignored files using an array of glob patterns
57
+ // forceCoverageMatch: [],
58
+
59
+ // A path to a module which exports an async function that is triggered once before all test suites
60
+ // globalSetup: undefined,
61
+
62
+ // A path to a module which exports an async function that is triggered once after all test suites
63
+ // globalTeardown: undefined,
64
+
65
+ // A set of global variables that need to be available in all test environments
66
+ globals: {},
67
+
68
+ // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
69
+ // maxWorkers: "50%",
70
+
71
+ // An array of directory names to be searched recursively up from the requiring module's location
72
+ // moduleDirectories: [
73
+ // "node_modules"
74
+ // ],
75
+
76
+ // An array of file extensions your modules use
77
+ // moduleFileExtensions: [
78
+ // "js",
79
+ // "json",
80
+ // "jsx",
81
+ // "ts",
82
+ // "tsx"
83
+ // ],
84
+
85
+ // A map from regular expressions to module names that allow to stub out resources with a single module
86
+ moduleNameMapper: {},
87
+
88
+ // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
89
+ // modulePathIgnorePatterns: [],
90
+
91
+ // Activates notifications for test results
92
+ // notify: false,
93
+
94
+ // An enum that specifies notification mode. Requires { notify: true }
95
+ // notifyMode: "failure-change",
96
+
97
+ // A preset that is used as a base for Jest's configuration
98
+ // preset: undefined,
99
+
100
+ // Run tests from one or more projects
101
+ // projects: undefined,
102
+
103
+ // Use this configuration option to add custom reporters to Jest
104
+ reporters: ['default', 'jest-junit'],
105
+
106
+ // Automatically reset mock state between every test
107
+ // resetMocks: false,
108
+
109
+ // Reset the module registry before running each individual test
110
+ // resetModules: false,
111
+
112
+ // A path to a custom resolver
113
+ // resolver: undefined,
114
+
115
+ // Automatically restore mock state between every test
116
+ // restoreMocks: false,
117
+
118
+ // The root directory that Jest should scan for tests and modules within
119
+ // rootDir: undefined,
120
+
121
+ // A list of paths to directories that Jest should use to search for files in
122
+ // roots: [
123
+ // "<rootDir>"
124
+ // ],
125
+
126
+ // Allows you to use a custom runner instead of Jest's default test runner
127
+ // runner: "jest-runner",
128
+
129
+ // The paths to modules that run some code to configure or set up the testing environment before each test
130
+ setupFiles: ['<rootDir>/src/jest-polyfills.ts'],
131
+
132
+ // A list of paths to modules that run some code to configure or set up the testing framework before each test
133
+ setupFilesAfterEnv: ['<rootDir>/src/jest-env-setup.ts'],
134
+
135
+ // A list of paths to snapshot serializer modules Jest should use for snapshot testing
136
+ // snapshotSerializers: [],
137
+
138
+ // The test environment that will be used for testing
139
+ // testEnvironment: "node",
140
+
141
+ // Options that will be passed to the testEnvironment
142
+ // testEnvironmentOptions: {},
143
+
144
+ // Adds a location field to test results
145
+ // testLocationInResults: false,
146
+
147
+ // The glob patterns Jest uses to detect test files
148
+ // testMatch: [
149
+ // "**/__tests__/**/*.[jt]s?(x)",
150
+ // "**/?(*.)+(spec|test).[tj]s?(x)"
151
+ // ],
152
+
153
+ // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
154
+ testPathIgnorePatterns: ['/node_modules/']
155
+
156
+ // The regexp pattern or array of patterns that Jest uses to detect test files
157
+ // testRegex: [],
158
+
159
+ // This option allows the use of a custom results processor
160
+ // testResultsProcessor: undefined,
161
+
162
+ // This option allows use of a custom test runner
163
+ // testRunner: "jasmine2",
164
+
165
+ // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
166
+ // testURL: "http://localhost",
167
+
168
+ // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
169
+ // timers: "real",
170
+
171
+ // A map from regular expressions to paths to transformers
172
+ // "transform": {
173
+ // "^.+\\.[t|j]sx?$": "babel-jest"
174
+ // },
175
+
176
+ // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
177
+ // transformIgnorePatterns: [
178
+ // "/node_modules/"
179
+ // ],
180
+
181
+ // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
182
+ // unmockedModulePathPatterns: undefined,
183
+
184
+ // Indicates whether each individual test should be reported during the run
185
+ // verbose: undefined,
186
+
187
+ // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
188
+ // watchPathIgnorePatterns: [],
189
+
190
+ // Whether to use watchman for file crawling
191
+ // watchman: true,
192
+ };
package/package.json CHANGED
@@ -1,22 +1,24 @@
1
1
  {
2
2
  "name": "@zextras/carbonio-design-system",
3
- "version": "0.3.10",
3
+ "version": "0.4.0-devel.1663244158706",
4
4
  "description": "An awesome UI for Zextras Projects.",
5
5
  "main": "dist/zapp-ui.bundle.js",
6
+ "types": "dist/zapp-ui.bundle.d.ts",
6
7
  "scripts": {
7
8
  "start": "npm run styleguide",
8
9
  "release": "standard-version",
9
10
  "lint": "eslint --ext .js,.jsx,.ts,.tsx --resolve-plugins-relative-to node_modules/@zextras/carbonio-ui-configs src",
10
11
  "styleguide": "styleguidist server",
11
12
  "styleguide:build": "styleguidist build",
12
- "test": "jest",
13
+ "test": "(is-ci && jest --runInBand) || jest --maxWorkers=50%",
13
14
  "icons:build": "npx @svgr/cli -d src/icons svg && npx create-index -ri ./src/icons --extensions js jsx --outputFile index.jsx",
14
- "build": "npx rollup -c rollup.config.js",
15
- "clean": "rm -rf dist/*",
16
- "prepublishOnly": "pinst --disable && npm run clean && npm run build",
17
- "deploy": "npm run prepublishOnly && rm -rf $PKG_PATH/node_modules/@zextras/carbonio-design-system/dist/ && cp -r dist/ $PKG_PATH/node_modules/@zextras/carbonio-design-system/dist/ && cp package.json $PKG_PATH/node_modules/@zextras/carbonio-design-system/ && cd $PKG_PATH/node_modules/@zextras/carbonio-design-system/ && rm -rf node_modules && npm i --only=prod",
18
- "_postinstall": "is-ci || husky install",
19
- "postpublish": "pinst --enable",
15
+ "build": "npx rollup -c rollup.config.js && npm run build:types",
16
+ "build:types": "tsc -p tsconfig.types.json && npx @microsoft/api-extractor run --local --verbose",
17
+ "clean": "rm -rf dist/* types/*",
18
+ "prepack": "npm run clean && npm run build",
19
+ "packTo": "npm pack --pack-destination $PKG_PATH && cd $PKG_PATH && npm i zextras-carbonio-design-system-$npm_package_version.tgz",
20
+ "deploy": "npm pack && rm -rf $PKG_PATH/node_modules/@zextras/carbonio-design-system/* && tar -xf zextras-carbonio-design-system-$npm_package_version.tgz -C $PKG_PATH/node_modules/@zextras/carbonio-design-system/ --strip-components 1",
21
+ "prepare": "is-ci || husky install",
20
22
  "type-check": "tsc --noEmit"
21
23
  },
22
24
  "repository": {
@@ -42,17 +44,19 @@
42
44
  "@babel/preset-typescript": "7.16.0",
43
45
  "@commitlint/cli": "15.0.0",
44
46
  "@commitlint/config-conventional": "15.0.0",
45
- "@quickbaseoss/babel-plugin-styled-components-css-namespace": "1.0.1",
47
+ "@faker-js/faker": "^6.0.0",
48
+ "@microsoft/api-extractor": "^7.28.6",
46
49
  "@rollup/plugin-babel": "5.3.0",
47
50
  "@rollup/plugin-commonjs": "21.0.1",
48
51
  "@rollup/plugin-node-resolve": "13.0.6",
49
52
  "@rollup/plugin-typescript": "8.3.0",
50
- "@svgr/cli": "5.5.0",
53
+ "@svgr/cli": "^6.3.1",
51
54
  "@testing-library/jest-dom": "5.15.0",
52
55
  "@testing-library/react": "12.1.2",
53
56
  "@testing-library/react-hooks": "7.0.2",
54
57
  "@testing-library/user-event": "13.5.0",
55
58
  "@types/lodash": "^4.14.178",
59
+ "@types/react-datepicker": "^4.3.4",
56
60
  "@types/styled-components": "5.1.20",
57
61
  "@zextras/carbonio-ui-configs": "^0.1.11",
58
62
  "babel-loader": "8.2.3",
@@ -62,7 +66,6 @@
62
66
  "core-js": "3.19.1",
63
67
  "create-index": "2.6.0",
64
68
  "eslint-plugin-notice": "^0.9.10",
65
- "faker": "^5.5.3",
66
69
  "file-loader": "6.2.0",
67
70
  "husky": "5.2.0",
68
71
  "is-ci": "3.0.1",
@@ -70,11 +73,10 @@
70
73
  "jest-junit": "13.0.0",
71
74
  "jest-styled-components": "7.0.6",
72
75
  "lodash": "^4.17.21",
73
- "pinst": "2.1.6",
74
76
  "process": "0.11.10",
75
77
  "react": "^17.0.2",
76
78
  "react-dom": "^17.0.2",
77
- "react-styleguidist": "^11.1.8",
79
+ "react-styleguidist": "^11.2.0",
78
80
  "react-test-renderer": "17.0.2",
79
81
  "rollup": "2.63.0",
80
82
  "rollup-plugin-copy": "3.4.0",