@aurodesignsystem/auro-library 2.4.4 → 2.4.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Semantic Release Automated Changelog
2
2
 
3
+ ## [2.4.6](https://github.com/AlaskaAirlines/auro-library/compare/v2.4.5...v2.4.6) (2024-02-07)
4
+
5
+
6
+ ### Performance Improvements
7
+
8
+ * add support for version extraction ([d7d80cd](https://github.com/AlaskaAirlines/auro-library/commit/d7d80cda8b605300553fa67c38249d73ab23ca07))
9
+
10
+ ## [2.4.5](https://github.com/AlaskaAirlines/auro-library/compare/v2.4.4...v2.4.5) (2024-02-06)
11
+
12
+
13
+ ### Performance Improvements
14
+
15
+ * remove unnecessary auto-assigned ([1d6b88c](https://github.com/AlaskaAirlines/auro-library/commit/1d6b88c004e16de3c8c95d5fe1f1adcf2590496d))
16
+
3
17
  ## [2.4.4](https://github.com/AlaskaAirlines/auro-library/compare/v2.4.3...v2.4.4) (2024-02-06)
4
18
 
5
19
 
@@ -14,28 +14,30 @@ const readmeFilePath = dirDocTemplates + '/README.md';
14
14
  */
15
15
 
16
16
  function nameExtraction() {
17
- const packageJson = fs.readFileSync('package.json', 'utf8', function(err, data) {
18
- if (err) {
19
- console.log('ERROR: Unable to read package.json file', err);
20
- }
21
- })
22
-
23
- let pName = JSON.parse(packageJson).name;
24
-
25
- let npmStart = pName.indexOf('@');
26
- let namespaceStart = pName.indexOf('/');
27
- let nameStart = pName.indexOf('-');
28
-
29
- let result = {
30
- 'npm': pName.substring(npmStart, namespaceStart),
31
- 'namespace': pName.substring(namespaceStart + 1, nameStart),
32
- 'namespaceCap': pName.substring(namespaceStart + 1)[0].toUpperCase() + pName.substring(namespaceStart + 2, nameStart),
33
- 'name': pName.substring(nameStart + 1),
34
- 'nameCap': pName.substring(nameStart + 1)[0].toUpperCase() + pName.substring(nameStart + 2)
35
- };
36
-
37
- return result;
38
- }
17
+ const packageJson = fs.readFileSync('package.json', 'utf8', function(err, data) {
18
+ if (err) {
19
+ console.log('ERROR: Unable to read package.json file', err);
20
+ }
21
+ })
22
+
23
+ let pName = JSON.parse(packageJson).name;
24
+ let pVersion = JSON.parse(packageJson).version;
25
+
26
+ let npmStart = pName.indexOf('@');
27
+ let namespaceStart = pName.indexOf('/');
28
+ let nameStart = pName.indexOf('-');
29
+
30
+ let result = {
31
+ 'npm': pName.substring(npmStart, namespaceStart),
32
+ 'namespace': pName.substring(namespaceStart + 1, nameStart),
33
+ 'namespaceCap': pName.substring(namespaceStart + 1)[0].toUpperCase() + pName.substring(namespaceStart + 2, nameStart),
34
+ 'name': pName.substring(nameStart + 1),
35
+ 'nameCap': pName.substring(nameStart + 1)[0].toUpperCase() + pName.substring(nameStart + 2),
36
+ 'version': pVersion
37
+ };
38
+
39
+ return result;
40
+ }
39
41
 
40
42
  /**
41
43
  * Replace all instances of [npm], [name], [Name], [namespace] and [Namespace] accordingly
@@ -53,6 +55,7 @@ function formatTemplateFileContents(content, destination) {
53
55
  result = result.replace(/\[Name](?!\()/g, nameExtractionData.nameCap);
54
56
  result = result.replace(/\[namespace]/g, nameExtractionData.namespace);
55
57
  result = result.replace(/\[Namespace]/g, nameExtractionData.namespaceCap);
58
+ result = result.replace(/\[Version]/g, nameExtractionData.version);
56
59
 
57
60
  /**
58
61
  * Cleanup line breaks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem/auro-library",
3
- "version": "2.4.4",
3
+ "version": "2.4.6",
4
4
  "description": "This repository holds shared scripts, utilities, and workflows utilized across repositories along the Auro Design System.",
5
5
  "repository": {
6
6
  "type": "git",