@procore/globalization-toolkit 1.7.1 → 1.8.1

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.
Files changed (86) hide show
  1. package/README.md +17 -6
  2. package/dist/docs/assets/main.d.ts +0 -0
  3. package/dist/docs/assets/main.js +604 -0
  4. package/dist/docs/assets/main.js.map +1 -0
  5. package/dist/docs/assets/search.d.ts +0 -0
  6. package/dist/docs/assets/search.js +3 -0
  7. package/dist/docs/assets/search.js.map +1 -0
  8. package/dist/{Formatter.types.d.ts → src/Formatter.types.d.ts} +0 -0
  9. package/dist/{Formatter.types.js → src/Formatter.types.js} +0 -0
  10. package/dist/{Formatter.types.js.map → src/Formatter.types.js.map} +1 -1
  11. package/dist/{FormatterUtils.d.ts → src/FormatterUtils.d.ts} +0 -0
  12. package/dist/{FormatterUtils.js → src/FormatterUtils.js} +0 -0
  13. package/dist/src/FormatterUtils.js.map +1 -0
  14. package/dist/{dateTimes → src/dateTimes}/DateTime.types.d.ts +0 -0
  15. package/dist/{dateTimes → src/dateTimes}/DateTime.types.js +0 -0
  16. package/dist/src/dateTimes/DateTime.types.js.map +1 -0
  17. package/dist/{dateTimes → src/dateTimes}/DateTimeFormatter.d.ts +0 -0
  18. package/dist/{dateTimes → src/dateTimes}/DateTimeFormatter.js +0 -0
  19. package/dist/src/dateTimes/DateTimeFormatter.js.map +1 -0
  20. package/dist/{dateTimes → src/dateTimes}/DateTimeUtils.d.ts +0 -0
  21. package/dist/{dateTimes → src/dateTimes}/DateTimeUtils.js +0 -0
  22. package/dist/src/dateTimes/DateTimeUtils.js.map +1 -0
  23. package/dist/{index.d.ts → src/index.d.ts} +2 -2
  24. package/dist/{index.js → src/index.js} +2 -1
  25. package/dist/src/index.js.map +1 -0
  26. package/dist/{numbers → src/numbers}/Currency.types.d.ts +0 -0
  27. package/dist/{numbers → src/numbers}/Currency.types.js +0 -0
  28. package/dist/src/numbers/Currency.types.js.map +1 -0
  29. package/dist/{numbers → src/numbers}/CurrencyFormatter.d.ts +0 -0
  30. package/dist/{numbers → src/numbers}/CurrencyFormatter.js +0 -0
  31. package/dist/src/numbers/CurrencyFormatter.js.map +1 -0
  32. package/dist/{numbers → src/numbers}/CurrencyUtils.d.ts +0 -0
  33. package/dist/{numbers → src/numbers}/CurrencyUtils.js +0 -0
  34. package/dist/{numbers → src/numbers}/CurrencyUtils.js.map +1 -1
  35. package/dist/{numbers → src/numbers}/Number.types.d.ts +7 -2
  36. package/dist/src/numbers/Number.types.js +8 -0
  37. package/dist/src/numbers/Number.types.js.map +1 -0
  38. package/dist/{numbers → src/numbers}/NumberFormatter.d.ts +4 -3
  39. package/dist/{numbers → src/numbers}/NumberFormatter.js +14 -12
  40. package/dist/src/numbers/NumberFormatter.js.map +1 -0
  41. package/dist/{numbers → src/numbers}/NumberUtils.d.ts +2 -1
  42. package/dist/{numbers → src/numbers}/NumberUtils.js +6 -1
  43. package/dist/src/numbers/NumberUtils.js.map +1 -0
  44. package/dist/tsconfig.build.tsbuildinfo +1 -1
  45. package/docs/.nojekyll +1 -0
  46. package/docs/assets/highlight.css +36 -0
  47. package/docs/assets/main.js +54 -0
  48. package/docs/assets/search.js +1 -0
  49. package/docs/assets/style.css +1225 -0
  50. package/docs/classes/CurrencyFormatter.html +156 -0
  51. package/docs/classes/NumberFormatter.html +177 -0
  52. package/docs/functions/formatCurrency.html +86 -0
  53. package/docs/functions/formatCurrencyToParts.html +86 -0
  54. package/docs/functions/formatNumber.html +86 -0
  55. package/docs/functions/formatNumberToParts.html +86 -0
  56. package/docs/functions/getSeparators.html +81 -0
  57. package/docs/functions/parseCurrency.html +86 -0
  58. package/docs/functions/parseNumber.html +86 -0
  59. package/docs/index.html +155 -0
  60. package/docs/index.md +4 -0
  61. package/docs/interfaces/CurrencyOptions.html +106 -0
  62. package/docs/interfaces/NumberOptions.html +92 -0
  63. package/docs/modules.html +100 -0
  64. package/docs/types/CurrencyDisplay.html +67 -0
  65. package/docs/types/CurrencySign.html +67 -0
  66. package/docs/types/FormatterOptions.html +71 -0
  67. package/docs/types/Locale.html +66 -0
  68. package/docs/types/NumberFormatPart.html +73 -0
  69. package/docs/types/NumberFormatPartTypes.html +66 -0
  70. package/docs/types/Percent.html +67 -0
  71. package/docs/types/Separators.html +73 -0
  72. package/docs/variables/CurrencyDisplay-1.html +78 -0
  73. package/docs/variables/CurrencySign-1.html +74 -0
  74. package/docs/variables/Percent-1.html +74 -0
  75. package/package.json +8 -5
  76. package/dist/FormatterUtils.js.map +0 -1
  77. package/dist/dateTimes/DateTime.types.js.map +0 -1
  78. package/dist/dateTimes/DateTimeFormatter.js.map +0 -1
  79. package/dist/dateTimes/DateTimeUtils.js.map +0 -1
  80. package/dist/index.js.map +0 -1
  81. package/dist/numbers/Currency.types.js.map +0 -1
  82. package/dist/numbers/CurrencyFormatter.js.map +0 -1
  83. package/dist/numbers/Number.types.js +0 -3
  84. package/dist/numbers/Number.types.js.map +0 -1
  85. package/dist/numbers/NumberFormatter.js.map +0 -1
  86. package/dist/numbers/NumberUtils.js.map +0 -1
package/README.md CHANGED
@@ -13,35 +13,43 @@ $ npm i --save @procore/globalization-toolkit
13
13
  ```
14
14
 
15
15
  # Developing
16
+
16
17
  Install dependencies:
18
+
17
19
  ```sh
18
20
  $ npm install
19
21
  ```
20
22
 
21
23
  Prepare project:
24
+
22
25
  ```sh
23
26
  $ npm run prepare
24
27
  ```
25
28
 
26
29
  Compile Typescript:
30
+
27
31
  ```sh
28
32
  $ npm run build
29
33
  ```
34
+
30
35
  (Delete build `npm run clean`)
31
36
 
32
37
  ## Testing
38
+
33
39
  ```sh
34
40
  $ npm run test
35
41
  ```
36
42
 
37
43
  If adding a new supported export (or removing one in a breaking change), update the snapshot test output and commit the change.
44
+
38
45
  ```sh
39
- $ npm run test -u
46
+ $ npm run test -- -u
40
47
  ```
41
48
 
42
49
  To check formatting run `npm run lint:check` and `npm run format:check`.
43
50
 
44
51
  ## Committing Changes
52
+
45
53
  Our repo follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
46
54
  and [Semantic Versioning](https://semver.org/) specifications.
47
55
  The Conventional Commit format is used to map commits to the next Semantic Version published to `NPM`,
@@ -56,12 +64,15 @@ Generally, commits should be in the format:
56
64
 
57
65
  [optional footer(s)]
58
66
  ```
67
+
59
68
  We use the command line tool [`commitizen`](https://github.com/commitizen/cz-cli#using-the-command-line-tool) to help walk you through generating a Conventional Commit.
60
69
 
61
70
  **To invoke this tool run:**
71
+
62
72
  ```sh
63
73
  $ npm run cm
64
74
  ```
75
+
65
76
  (Optional: [run commitizen on `git commit`](https://github.com/commitizen/cz-cli#optional-running-commitizen-on-git-commit))
66
77
 
67
78
  #### Certain commits are analyzed and mapped to versioning as follows:
@@ -72,25 +83,25 @@ $ npm run cm
72
83
 
73
84
  - `PATCH` release for commit types `fix` or `perf`.
74
85
 
75
-
76
86
  - No release is triggered for all other commit types.
77
87
  And commits that do not match any format rules or have `no-release` as the scope
78
88
  will not trigger a release.
79
89
 
80
90
  Additionally, `releaseRules` are specified in `package.json` for specific commits:
91
+
81
92
  - `build(deps-dev):` does not trigger a release (development dependency changes, typically version bumps by `dependabot`).
82
93
  - `build(deps):` triggers a `PATCH` release.
83
94
 
84
- *Details about how commit types are mapped to versioning can be found in the [commit-analyzer documentation](https://github.com/semantic-release/commit-analyzer/#default-rules-matching).*
85
-
95
+ _Details about how commit types are mapped to versioning can be found in the [commit-analyzer documentation](https://github.com/semantic-release/commit-analyzer/#default-rules-matching)._
86
96
 
87
97
  # Publishing
98
+
88
99
  Merges to `main` will trigger the `publish` workflow in CircleCi.
89
100
  We use [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/) to manage releases and publishing to `NPM`.
90
101
  Semantic Release relies on the project's commit history
91
102
  to create release notes and determine the next version.
92
103
 
93
-
94
104
  ### Release Notes:
105
+
95
106
  The `<description>` for commits selected for publishing are added to the release notes
96
- and can be found in the **Releases** section of Github.
107
+ and can be found in the **Releases** section of Github.
File without changes