@aurodesignsystem/auro-library 3.0.1 → 3.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Semantic Release Automated Changelog
2
2
 
3
+ ## [3.0.2](https://github.com/AlaskaAirlines/auro-library/compare/v3.0.1...v3.0.2) (2024-11-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * automatically create `docTemplate` when generating docs [#94](https://github.com/AlaskaAirlines/auro-library/issues/94) ([e6195d9](https://github.com/AlaskaAirlines/auro-library/commit/e6195d958233cd5b0902cb5afbf769dff246e852))
9
+
10
+
11
+ ### Performance Improvements
12
+
13
+ * omit dir exist checking (sourcery reccomendation) ([68de618](https://github.com/AlaskaAirlines/auro-library/commit/68de61844960bf6d32df2ed66ca714857da1d623))
14
+
3
15
  ## [3.0.1](https://github.com/AlaskaAirlines/auro-library/compare/v3.0.0...v3.0.1) (2024-11-07)
4
16
 
5
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem/auro-library",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
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",
@@ -1,7 +1,7 @@
1
1
  export default (code, sourcePath) => {
2
2
  const defaultTag = (code.match(/static register\(name \= (.+)\)/) || code.match(/customElements.get\((.+?)\)/))[1];
3
3
  const className = code.match(/export class (.+) extends/)?.[1];
4
- const classDesc = code.match(/\/\*\*((.|\n)*?)\*\//)?.[1] || '';
4
+ const classDesc = code.match(/\/\*\*((.|\n)*?)(\*\n|\*\/)/)?.[1] || '';
5
5
 
6
6
  if (!defaultTag || !className) {
7
7
  return code;
@@ -1,4 +1,5 @@
1
1
  import fs from 'node:fs/promises';
2
+ import path from 'node:path';
2
3
 
3
4
  import {Logger} from "../utils/logger.mjs";
4
5
 
@@ -40,7 +41,9 @@ export class AuroFileHandler {
40
41
  * @returns {Promise<boolean>}
41
42
  */
42
43
  static async tryWriteFile(filePath, fileContents) {
43
- try {
44
+ try {
45
+ const dirname = path.dirname(filePath);
46
+ await fs.mkdir(dirname, {recursive: true});
44
47
  await fs.writeFile(filePath, fileContents, {encoding: 'utf-8'});
45
48
  return true;
46
49
  } catch (err) {