You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>various utility functions, constants and helper types - usable in Node and Browsers
20
19
21
20
## Usage
21
+
22
22
Add a `.npmrc` file to the root of your project:
23
+
23
24
```
24
25
@shiftcode:registry=https://npm.pkg.github.com
25
26
```
26
27
27
28
## Quick Start
28
-
*`npm i`
29
-
*`npm run build`
30
-
* start developing
31
29
30
+
-`npm i`
31
+
-`npm run build`
32
+
- start developing
32
33
33
34
## Versioning
35
+
34
36
When opening a PR lerna publishes a new prerelease version with the preId `-prXX.{COUNT}`.
35
37
By creating this version lerna creates a commit with the updated versions in the package.json. It does not update the `peerDependencies` versions.
36
38
@@ -39,26 +41,31 @@ After merging the PR back to the master a new release is published with the grad
39
41
> ensure your branch is named correctly by the convention `#XX-name` where `XX` is your github issue number.
40
42
41
43
### Hint
44
+
42
45
If it happens that you already have another commit locally, before updating the branch with this `build(release):..` commit:
43
-
> use `rebase` instead of `merge`
44
46
47
+
> use `rebase` instead of `merge`
45
48
46
49
## Anatomy of the repo
47
50
48
51
We use lerna to manage the packages.
52
+
49
53
- For lerna to know the topological order of packages, we define the dependencies between the packages in each individual package as `devDependency`
50
54
- For testing reasons we compile against the source code to run tests without prior compiling of the source, this requires `tsconfig.paths` definitions and also `moduleNameMapper` in `jest.config.js`
51
55
52
56
## ES Version
57
+
53
58
We support two runtimes: `node` and `latest browser versions`.
54
59
55
60
### Node 22
56
-
Node 22 (which is also supported by AWS Lambda) supports [97%](https://node.green/#ES2022) of `es2022` features
61
+
62
+
Node 22 (which is also supported by AWS Lambda) supports [97%](https://node.green/#ES2022) of `es2022` features
57
63
(no version supports 100%) and [100%](https://node.green/#ES2023) of `es2023` features.
58
64
The only `es2022` feature that is currently not supported and needs a polyfill when using it is
59
-
[RegExp Match Indices (shows up in flags)](https://node.green/#ES2022-features-RegExp-Match-Indices---hasIndices-----d--flag-) (see [2ality blog](https://2ality.com/2019/12/regexp-match-indices.html) for insights).
65
+
[RegExp Match Indices (shows up in flags)](https://node.green/#ES2022-features-RegExp-Match-Indices---hasIndices-----d--flag-) (see [2ality blog](https://2ality.com/2019/12/regexp-match-indices.html) for insights).
60
66
Polyfill can be found here: https://www.npmjs.com/package/regexp-match-indices.
61
67
62
68
### Browser
69
+
63
70
For modern browsers the latest fully supported version is `es2023` (see [can-i-use](https://caniuse.com/?search=es2023))
64
71
which therefore is the target for `@shiftcode/utilities` package (see [package README](./packages/utilities/README.md)).
0 commit comments