@eventcatalog/core 2.2.5 → 2.2.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.
@@ -11,7 +11,10 @@ jobs:
11
11
  build:
12
12
  name: Verify Build
13
13
  timeout-minutes: 30
14
- runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ os: [ubuntu-latest, windows-latest]
17
+ runs-on: ${{ matrix.os }}
15
18
  steps:
16
19
  - uses: actions/checkout@v4
17
20
  - uses: actions/setup-node@v4
@@ -19,9 +22,5 @@ jobs:
19
22
  node-version: '20.x'
20
23
  - name: Installation
21
24
  run: npm i
22
- - name: Log
23
- run: ls
24
- - name: Log2
25
- run: pwd
26
25
  - name: Build
27
26
  run: npm run verify-build:catalog
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 50a43e0: core(fix): removed forward slash before # to prevent double trailing slash
8
+ - 8104078: chore(core): added windows tests and fixed watcher to work with changelogs files on windows
9
+
3
10
  ## 2.2.5
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eventcatalog/core",
3
3
  "type": "module",
4
- "version": "2.2.5",
4
+ "version": "2.2.6",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -16,7 +16,7 @@
16
16
  "test": "jest --config=$(pwd)/../../jest.config.js",
17
17
  "start": "astro dev",
18
18
  "build": "npm run scripts:hydrate-content && astro check --minimumSeverity error && astro build",
19
- "build:cd": "node scripts/build-ci.js && astro check --minimumSeverity error && astro build",
19
+ "build:cd": "node scripts/build-ci.js",
20
20
  "preview": "astro preview",
21
21
  "astro": "astro",
22
22
  "scripts:hydrate-content": "node scripts/catalog-to-astro-content-directory.js",
@@ -16,7 +16,7 @@ fs.copyFileSync(join(projectDIR, 'eventcatalog.config.js'), join(catalogDir, 'ev
16
16
 
17
17
  fs.copyFileSync(join(projectDIR, 'eventcatalog.styles.css'), join(catalogDir, 'eventcatalog.styles.css'));
18
18
 
19
- execSync(`cross-env NODE_ENV=CI PROJECT_DIR=${projectDIR} CATALOG_DIR=${catalogDir} npm run scripts:hydrate-content`, {
19
+ execSync(`cross-env NODE_ENV=CI PROJECT_DIR=${projectDIR} CATALOG_DIR=${catalogDir} npm run build`, {
20
20
  cwd: catalogDir,
21
21
  stdio: 'inherit',
22
22
  });
@@ -40,17 +40,19 @@ const copyFiles = async ({ source, target, catalogFilesDir, pathToMarkdownFiles,
40
40
 
41
41
  // Copy markdown files into the astro content (collection) folder
42
42
  for (const file of markdownFiles) {
43
- const targetPath = getTargetPath(source, target, type, file);
43
+ let fileTarget = target;
44
+
45
+ // If they are change logs they need to go into their own content folder
46
+ if (file.includes('changelog.md')) {
47
+ fileTarget = path.join(target, 'changelogs');
48
+ }
49
+
50
+ const targetPath = getTargetPath(source, fileTarget, type, file);
44
51
 
45
52
  //ensure the directory exists
46
53
  ensureDirSync(path.dirname(targetPath));
47
54
 
48
- if (file.includes('changelog.md')) {
49
- const target = targetPath.replace('/content', '/content/changelogs');
50
- fs.cpSync(file, target.replace('changelog.md', 'changelog.mdx'));
51
- } else {
52
- fs.cpSync(file, targetPath.replace('index.md', 'index.mdx').replace('changelog.md', 'changelog.mdx'));
53
- }
55
+ fs.cpSync(file, targetPath.replace('index.md', 'index.mdx').replace('changelog.md', 'changelog.mdx'));
54
56
  }
55
57
 
56
58
  // Copy all other files (non markdown) files into catalog-files directory (non collection)
@@ -35,6 +35,10 @@ for (let item of [...verifiedWatchList]) {
35
35
  // Check if changlogs, they need to go into their own content folder
36
36
  if (file.includes('changelog.md')) {
37
37
  newPath = newPath.replace('src/content', 'src/content/changelogs');
38
+
39
+ if (os.platform() == 'win32') {
40
+ newPath = newPath.replace('src\\content', 'src\\content\\changelogs');
41
+ }
38
42
  }
39
43
 
40
44
  // If config files have changes
@@ -95,7 +95,7 @@ const currentPath = Astro.url.pathname;
95
95
  {item.items.map((heading: any) => {
96
96
  return (
97
97
  <li class="text-xs">
98
- <a href={`${item.href}/#${heading.slug}`}>{heading.text}</a>
98
+ <a href={`${item.href}#${heading.slug}`}>{heading.text}</a>
99
99
  </li>
100
100
  );
101
101
  })}
@@ -133,7 +133,7 @@ const badges = [
133
133
  <div>
134
134
  <!-- @ts-ignore -->
135
135
  <SchemaViewer id={props.data.id} catalog={props.catalog} />
136
- <NodeGraph id={props.data.id} collection={props.collection} version={props.data.version} mode="simple" href={{ label: 'Open in Visualiser', url: `/visualiser/${props.collection}/${props.data.id}/${props.data.version}`}} />
136
+ <NodeGraph id={props.data.id} collection={props.collection} version={props.data.version} mode="simple" href={{ label: 'Open in Visualiser', url: buildUrl(`/visualiser/${props.collection}/${props.data.id}/${props.data.version}`)}} />
137
137
  </div>
138
138
  <Footer />
139
139
  </main>