fhir-react 2.0.1-beta.1 → 2.0.1-beta.11

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.js CHANGED
@@ -16,7 +16,7 @@ module.exports = {
16
16
  // lines: 70,
17
17
  // },
18
18
  },
19
- moduleDirectories: ['node_modules', 'src'],
19
+ moduleDirectories: ['node_modules'],
20
20
  moduleNameMapper: {
21
21
  '.*\\.(css|less|styl|scss|sass)$': '<rootDir>/jest/mocks/cssModule.js',
22
22
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
@@ -24,4 +24,12 @@ module.exports = {
24
24
  },
25
25
  // testRegex: 'tests/.*\\.test\\.js$',
26
26
  snapshotSerializers: [],
27
+ testEnvironment: 'jsdom',
28
+ setupFiles: ['<rootDir>/jest.setup.js'],
29
+ transform: {
30
+ "\\.[jt]sx?$": ["babel-jest", { "extends": "./.babelrc", "plugins": ["babel-plugin-transform-import-meta"] }]
31
+ },
32
+ transformIgnorePatterns: [
33
+ "/node_modules/(?!(@nivo|d3-.*)/)",
34
+ ],
27
35
  };
package/jest.setup.js ADDED
@@ -0,0 +1,3 @@
1
+ import ResizeObserver from 'resize-observer-polyfill';
2
+
3
+ global.ResizeObserver = ResizeObserver;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fhir-react",
3
- "version": "2.0.1-beta.1",
3
+ "version": "2.0.1-beta.11",
4
4
  "description": "React component library for displaying FHIR Resources ",
5
5
  "main": "build/index.js",
6
6
  "peerDependencies": {
@@ -8,13 +8,12 @@
8
8
  "react-dom": "^18.3.1"
9
9
  },
10
10
  "dependencies": {
11
- "@nivo/core": "^0.78.0",
12
- "@nivo/pie": "^0.78.0",
13
- "@popperjs/core": "^2.11.2",
14
- "@storybook/addons": "^6.5.13",
11
+ "@nivo/core": "^0.84.0",
12
+ "@nivo/pie": "^0.84.0",
13
+ "@popperjs/core": "^2.11.8",
15
14
  "bootstrap": "^5.1.3",
16
15
  "dompurify": "^2.3.6",
17
- "lodash": "^4.17.21",
16
+ "lodash": "^4.17.23",
18
17
  "marked": "^3.0.8",
19
18
  "md5": "^2.3.0",
20
19
  "pretty-bytes": "^5.6.0",
@@ -60,44 +59,50 @@
60
59
  ],
61
60
  "license": "MIT",
62
61
  "devDependencies": {
63
- "@babel/cli": "^7.17.6",
64
- "@babel/core": "^7.17.5",
65
- "@babel/plugin-proposal-class-properties": "^7.16.7",
66
- "@babel/plugin-proposal-decorators": "^7.17.2",
67
- "@babel/plugin-proposal-do-expressions": "^7.16.7",
68
- "@babel/plugin-proposal-export-default-from": "^7.16.7",
69
- "@babel/plugin-proposal-export-namespace-from": "^7.16.7",
70
- "@babel/plugin-proposal-function-bind": "^7.16.7",
71
- "@babel/plugin-proposal-function-sent": "^7.16.7",
72
- "@babel/plugin-proposal-json-strings": "^7.16.7",
73
- "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7",
74
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
75
- "@babel/plugin-proposal-numeric-separator": "^7.16.7",
76
- "@babel/plugin-proposal-object-rest-spread": "^7.17.3",
77
- "@babel/plugin-proposal-optional-chaining": "^7.16.7",
78
- "@babel/plugin-proposal-pipeline-operator": "^7.17.6",
79
- "@babel/plugin-proposal-throw-expressions": "^7.16.7",
62
+ "@babel/cli": "^7.28.6",
63
+ "@babel/core": "^7.29.0",
64
+ "@babel/eslint-parser": "^7.28.6",
65
+ "@babel/plugin-proposal-decorators": "^7.29.0",
66
+ "@babel/plugin-proposal-do-expressions": "^7.28.6",
67
+ "@babel/plugin-proposal-export-default-from": "^7.27.1",
68
+ "@babel/plugin-proposal-function-bind": "^7.27.1",
69
+ "@babel/plugin-proposal-function-sent": "^7.27.1",
70
+ "@babel/plugin-proposal-pipeline-operator": "^7.28.6",
71
+ "@babel/plugin-proposal-throw-expressions": "^7.27.1",
80
72
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
81
73
  "@babel/plugin-syntax-import-meta": "^7.10.4",
74
+ "@babel/plugin-transform-class-properties": "^7.28.6",
75
+ "@babel/plugin-transform-export-namespace-from": "^7.27.1",
76
+ "@babel/plugin-transform-json-strings": "^7.28.6",
77
+ "@babel/plugin-transform-logical-assignment-operators": "^7.28.6",
78
+ "@babel/plugin-transform-modules-commonjs": "^7.28.6",
79
+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.28.6",
80
+ "@babel/plugin-transform-numeric-separator": "^7.28.6",
81
+ "@babel/plugin-transform-object-rest-spread": "^7.28.6",
82
+ "@babel/plugin-transform-optional-chaining": "^7.28.6",
82
83
  "@babel/plugin-transform-react-jsx": "^7.28.6",
83
- "@babel/polyfill": "^7.0.0",
84
- "@babel/preset-env": "^7.16.11",
84
+ "@babel/polyfill": "^7.12.1",
85
+ "@babel/preset-env": "^7.29.0",
85
86
  "@babel/preset-react": "^7.28.5",
87
+ "@storybook/addons": "^6.5.13",
86
88
  "@storybook/addon-controls": "^6.5.13",
87
89
  "@storybook/preset-scss": "^1.0.3",
88
90
  "@storybook/react": "^6.5.13",
89
91
  "@storybook/storybook-deployer": "^2.8.16",
90
- "@testing-library/react": "^13.4.0",
91
- "@typescript-eslint/eslint-plugin": "^5.14.0",
92
- "@typescript-eslint/parser": "^5.14.0",
93
- "babel-eslint": "^10.0.3",
94
- "babel-jest": "^24.9.0",
92
+ "@testing-library/dom": "^10.4.1",
93
+ "@testing-library/react": "^16.3.2",
94
+ "@testing-library/user-event": "^14.6.1",
95
+ "@typescript-eslint/eslint-plugin": "^8.53.1",
96
+ "@typescript-eslint/parser": "^8.53.1",
97
+ "babel-jest": "^29.7.0",
95
98
  "babel-loader": "^8.2.3",
96
99
  "babel-plugin-transform-imports": "^2.0.0",
100
+ "babel-plugin-transform-import-meta": "^2.3.3",
101
+ "babel-preset-jest": "^29.6.3",
97
102
  "copy-webpack-plugin": "^5.1.2",
98
103
  "css-loader": "^3.6.0",
99
104
  "dedent": "^0.7.0",
100
- "eslint": "^8.10.0",
105
+ "eslint": "^8.57.1",
101
106
  "eslint-config-prettier": "^8.5.0",
102
107
  "eslint-config-react-app": "^7.0.1",
103
108
  "eslint-plugin-flowtype": "^8.0.3",
@@ -106,18 +111,25 @@
106
111
  "eslint-plugin-prettier": "^4.0.0",
107
112
  "eslint-plugin-react": "^7.37.5",
108
113
  "eslint-plugin-react-hooks": "^7.0.1",
109
- "jest": "^24.9.0",
114
+ "jest": "^29.7.0",
115
+ "jest-environment-jsdom": "^30.2.0",
110
116
  "mini-css-extract-plugin": "^1.6.2",
111
117
  "npm-check-updates": "^16.7.9",
112
118
  "prettier": "1.19.1",
113
119
  "react": "^18.3.1",
114
120
  "react-dom": "^18.3.1",
121
+ "resize-observer-polyfill": "^1.5.1",
115
122
  "sass": "^1.49.9",
116
123
  "sass-loader": "^10.2.0",
117
124
  "style-loader": "^2.0.0",
118
125
  "stylelint": "^14.5.3",
119
126
  "stylelint-config-standard": "^25.0.0",
120
127
  "webpack": "^4.41.2",
121
- "webpack-cli": "^3.3.10"
128
+ "webpack-cli": "^3.3.10",
129
+ "webpack-node-externals": "^3.0.0"
130
+ },
131
+ "overrides": {
132
+ "react": "^18.3.1",
133
+ "react-dom": "^18.3.1"
122
134
  }
123
- }
135
+ }
package/webpack.config.js CHANGED
@@ -1,10 +1,11 @@
1
1
  const path = require('path');
2
2
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
3
  const CopyWebpackPlugin = require('copy-webpack-plugin');
4
+ const nodeExternals = require('webpack-node-externals');
4
5
 
5
6
  module.exports = {
6
- mode: process.env.NODE_ENV,
7
- entry: ['./src/index.js'],
7
+ mode: process.env.NODE_ENV ?? 'production',
8
+ entry: './src/index.js',
8
9
  output: {
9
10
  path: path.resolve(__dirname, 'build'),
10
11
  filename: 'index.js',
@@ -48,10 +49,9 @@ module.exports = {
48
49
  },
49
50
  ],
50
51
  },
51
- externals: {
52
- react: 'commonjs react', // this line is just to use the React dependency of our parent-testing-project instead of using our own React.
53
- 'react-dom': 'commonjs react-dom',
54
- },
52
+ externals: [nodeExternals({
53
+ allowlist: [ /^@nivo/, /^lodash/, /^bootstrap/, '@popperjs/core', 'dompurify', 'marked', 'md5', 'pretty-bytes', 'prop-types', 'svg-url-loader', 'd3-shape']
54
+ })],
55
55
  plugins: [
56
56
  new MiniCssExtractPlugin({
57
57
  filename: 'style.css',