@timum/booking 0.4.0 → 0.4.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
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@timum/booking",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "license": "CC-BY-ND-4.0",
5
5
  "main": "build/timum-booking.js",
6
+ "module": "build/timum-booking.mjs",
6
7
  "publishConfig": {
7
8
  "access": "public"
8
9
  },
@@ -58,7 +59,7 @@
58
59
  },
59
60
  "scripts": {
60
61
  "start": "react-scripts start",
61
- "build": "node ./build.js",
62
+ "build": "node ./build.js && rollup --config",
62
63
  "np:preview": "np --no-cleanup --preview",
63
64
  "np:publish": "yarn build && np --no-cleanup",
64
65
  "co:login": "aws codeartifact login --tool npm --repository timum --domain timum --domain-owner 075866820991 --namespace @timum-private",
@@ -99,7 +100,14 @@
99
100
  },
100
101
  "devDependencies": {
101
102
  "@babel/plugin-transform-modules-amd": "^7.16.7",
103
+ "@babel/plugin-transform-runtime": "^7.19.6",
104
+ "@babel/preset-env": "^7.20.2",
105
+ "@babel/preset-react": "^7.18.6",
102
106
  "@faker-js/faker": "^7.5.0",
107
+ "@rollup/plugin-babel": "^6.0.3",
108
+ "@rollup/plugin-commonjs": "^23.0.5",
109
+ "@rollup/plugin-node-resolve": "^15.0.1",
110
+ "@rollup/plugin-terser": "^0.4.0",
103
111
  "@storybook/addon-actions": "^6.5.7",
104
112
  "@storybook/addon-essentials": "^6.5.7",
105
113
  "@storybook/addon-interactions": "^6.5.7",
@@ -118,7 +126,9 @@
118
126
  "eslint-plugin-storybook": "^0.5.12",
119
127
  "mini-css-extract-plugin": "^1.2.0",
120
128
  "msw": "^0.39.2",
121
- "msw-storybook-addon": "^1.6.3"
129
+ "msw-storybook-addon": "^1.6.3",
130
+ "rollup": "^3.7.4",
131
+ "rollup-plugin-peer-deps-external": "^2.2.4"
122
132
  },
123
133
  "babel": {
124
134
  "presets": [
@@ -0,0 +1,44 @@
1
+ const resolve = require('@rollup/plugin-node-resolve');
2
+
3
+ //converts commonjs modules to ES6 so that they can be included in a rollup bundle
4
+ const commonjs = require('@rollup/plugin-commonjs');
5
+
6
+ // minifies the resulting code to further reduce package size
7
+ const terser = require('@rollup/plugin-terser');
8
+
9
+ // makes it so that deps marked as peer deps in package.json aren't included in the resulting bundle.
10
+ const peerDepsExternal = require('rollup-plugin-peer-deps-external');
11
+
12
+ // transpiles the code so older browser can interpret this
13
+ // if there is jsx in the repo this transforms it into plain javascript (at least if it's configured that way in your .babelrc)
14
+ const babel = require('@rollup/plugin-babel');
15
+
16
+ const packageJson = require('./package.json');
17
+
18
+ module.exports = {
19
+ input: 'src/index.js',
20
+ external: [/@babel\/runtime/],
21
+ output: [
22
+ {
23
+ file: packageJson.module,
24
+ format: 'es',
25
+ sourcemap: true,
26
+ },
27
+ ],
28
+ plugins: [
29
+ peerDepsExternal(),
30
+ resolve(),
31
+ babel({
32
+ exclude: 'node_modules/**',
33
+ babelHelpers: 'runtime',
34
+ presets: ['@babel/preset-env', '@babel/preset-react'],
35
+ plugins: ['@babel/plugin-transform-runtime'],
36
+ }),
37
+ commonjs({
38
+ strictRequires: true,
39
+ }),
40
+ terser({
41
+ sourceMap: true, // doesn't work for some reason
42
+ }),
43
+ ],
44
+ };
@@ -1,62 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="880.456px" height="241.488px" viewBox="0 0 880.456 241.488" enable-background="new 0 0 880.456 241.488"
6
- xml:space="preserve">
7
- <g>
8
- <g>
9
- <g>
10
- <rect x="640.548" y="156.704" width="40.839" height="61.295"/>
11
- <path d="M859.716,88.39c-3.814-8.761-9.576-15.403-17.292-19.926c-7.708-4.523-17.143-6.787-28.279-6.787
12
- c-8.764,0-17.001,2-24.717,6c-7.714,4-16.104,10.049-22.773,18.143c-4.571-8.094-9.225-14.143-16.366-18.143
13
- c-7.142-4-15.573-6-25.284-6c-18.285,0-30.358,8.393-43.592,24.486V65.709h-40.864v72.844h40.359
14
- c0.203-12.199,0.96-23.7,2.873-29.308c2.144-6.285,5.69-11.093,10.64-14.429c4.95-3.331,10.523-5,16.717-5
15
- c4.967,0,10.232,3.032,12.181,5.533l64.18-0.038c3.874-1.967,8.148-4.736,14.781-4.736c7.715,0,14.233,4.295,17.289,10.385
16
- c2.635,5.252,2.772,14.097,2.772,29.143v60.746h41.088v-71.031C863.428,105.342,862.475,94.868,859.716,88.39z"/>
17
- </g>
18
- <rect x="822.457" y="208.993" width="40.971" height="9.054"/>
19
- <path d="M732.258,202.133h40.142v-58.176c0-13.685,1.018-23.814,3.031-30.464h-43.882c0.466,5.021,0.709,11.71,0.709,20.18
20
- V202.133z"/>
21
- </g>
22
- <g>
23
- <polygon points="72.01,49.821 72.01,13.257 30.925,36.685 30.925,49.821 "/>
24
- <g>
25
- <polygon points="31.204,156.598 71.915,156.598 71.915,95.192 101.494,95.192 101.494,65.689 13.034,65.689 13.034,95.28
26
- 31.204,95.28 "/>
27
- <path d="M99.863,188.727c-6.82,3.601-10.496,5.022-14.21,5.022c-2.667,0-7.427,0.065-9.284-1.271
28
- c-1.857-1.332-3.304-4.022-3.827-6.071c-0.256-0.998-0.4-8.137-0.531-11.597l-41.428,0.151c0.164,8.758,0.563,13.679,1.2,17.153
29
- c1.048,6.57,2.929,12.967,5.643,16.826c2.715,3.856,6.976,6.997,12.785,9.425c5.808,2.428,12.333,3.986,19.572,3.986
30
- c11.808,0,24.525-0.972,33.858-4.968L99.863,188.727z"/>
31
- </g>
32
- </g>
33
- <g>
34
- <rect x="467.586" y="79.342" width="40.917" height="36.472"/>
35
- <g>
36
- <path d="M542.095,190.802c-2.031,0.379-7.578,1.854-9.752,1.854c-6.005,0-10.956-1.403-14.857-4.213
37
- c-3.909-2.806-6.596-6.617-8.075-11.43c-1.476-4.806-0.818-19.143-0.818-40.477v-2.58h-41.177v28.864
38
- c0,14.289,1.254,26.247,4.879,34.339c3.617,8.097,9.474,14.383,17.567,18.854c8.097,4.478,17.238,6.716,27.429,6.716
39
- c10.237,0,19.392-3.812,28.05-9.085c8.847-5.395,11.463-10.138,17.715-17.907v22.285l41.071-0.006v-27.215H542.095z"/>
40
- <path d="M604.126,172.66V79.342h-40.832v51.48c0,21.713-0.996,35.355-2.997,40.929c-0.113,0.313-0.373,0.6-0.498,0.908H604.126z"
41
- />
42
- </g>
43
- </g>
44
- <g>
45
- <path d="M203.935,113.52v105.013h40.744v-73.71c0-14.459,0.713-25.001,2.824-31.303H203.935z"/>
46
- <g>
47
- <rect x="294.841" y="174.81" width="40.741" height="43.723"/>
48
- <path d="M423.185,90.111c-3.81-8.761-9.353-17.549-17.064-22.074c-7.714-4.523-17.143-6.786-28.285-6.786
49
- c-8.763,0-17,2-24.713,5.999c-7.716,4-15.128,9.616-21.791,17.711c-4.572-8.095-10.171-13.71-17.314-17.711
50
- c-7.142-4-15.57-5.999-25.284-5.999c-18.285,0-30.865,10.194-44.102,26.289V74.998h-40.61v20.299l55.388,0.016
51
- c2.984-1.611,7.787-4.389,13.168-4.548c7.364-0.218,12.611,2.232,15.443,4.548c3.601,2.941,4.927,6.921,5.74,11.513
52
- c0.788,4.449,1.199,13.811,1.199,28.569v21.263h41.086v-10.978c0-14.282-0.426-28.649,1.767-35.269
53
- c2.189-6.618,5.761-11.643,10.714-15.071c4.951-3.429,10.235-4.8,15.855-4.8c7.714,0,14.477,4.365,18.191,10.078
54
- c2.76,4.382,3.222,16.029,3.222,31.075v70.311l41.018,0.13v-80.596C426.812,107.063,425.945,96.588,423.185,90.111z"/>
55
- </g>
56
- </g>
57
- <g>
58
- <rect x="126.599" y="15.729" width="40.911" height="29.37"/>
59
- <rect x="126.599" y="65.796" width="40.911" height="136.337"/>
60
- </g>
61
- </g>
62
- </svg>