-
Notifications
You must be signed in to change notification settings - Fork 231
Commit 6d132bd
committed
Make changes to support
The built version of this library that is downloaded when you run `npm
install @testing-library/react-hooks` contains a few features that are
not supported by `figbuild`. This forked version makes the following
changes:
- Output code that `figbuild` is set up to process. This was
accomplished by adding a `.browserslistrc` file that lists IE 11 as a
supported browser. While we don't actually support IE 11, this does
mean the build won't try to use any fancy new language features.
- Build with the `--bundle` option. This causes the build script to use
Rollup to generate a single script file, instead of separate ES6
modules. This is also required to make the build script care about the
`.browserslistrc` file.
- Update the `main` and `types` fields of `package.json`. The `--bundle`
option places the built file in a different location, under `dist` and
with a new filename.
- Update `tsconfig.json` to use an `ES5` target. I'm not sure if this
does anything, since we're using Babel to build, not Typescript. But
whatever, it can't hurt.
- Remove "smart" dynamic `require` logic to [choose a
renderer](https://react-hooks-testing-library.com/installation#renderer).
`figbuild` does not support dynamic `require` statements. I also
deleted tests for this logic.
- Remove submodules structure. Since we're no longer doing dynamic
requires, we also don't need to output
`@testing-library/react-hooks/dom` and similar directories.
If and when we move off of `figbuild`, we may be able to un-fork this
library.figbuild
1 parent eff2ca6 commit 6d132bd
File tree
9 files changed
+50
-111
lines changed- scripts
- src
- __tests__
9 files changed
+50
-111
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 | + | ||
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 | - | ||
23 | - | ||
24 | - | ||
25 | - | ||
26 | - | ||
27 | - | ||
28 | - | ||
29 | - | ||
30 | - | ||
31 | - | ||
32 | - | ||
33 | - | ||
34 | - | ||
35 | - | ||
36 | - | ||
37 | - | ||
38 | - | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
39 | 45 |
| |
40 | 46 |
| |
41 | 47 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | - | ||
2 | + | ||
3 | 3 |
| |
4 | 4 |
| |
5 | - | ||
6 | - | ||
5 | + | ||
6 | + | ||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | + | ||
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
30 | - | ||
31 | + | ||
31 | 32 |
| |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
37 | - | ||
38 | - | ||
38 | + | ||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 | - | ||
4 | + | ||
5 | + | ||
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | - | ||
2 | - | ||
3 | - | ||
4 | - | ||
5 | - | ||
6 | - | ||
7 | - | ||
8 | - | ||
9 | - | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | - | ||
15 | - | ||
16 | - | ||
17 | - | ||
18 | - | ||
19 | - | ||
20 | - | ||
21 | - | ||
22 | - | ||
23 | - | ||
24 | - | ||
25 | - | ||
26 | - | ||
27 | - | ||
28 | - | ||
29 | - | ||
30 | - | ||
31 | - | ||
32 | - | ||
33 | - | ||
34 | - | ||
35 | - | ||
36 | - | ||
37 | - | ||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
38 | 14 |
| |
39 | 15 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 | - | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
5 | 8 |
| |
6 | 9 |
|
0 commit comments