Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor/workspaces #946

Closed

Conversation

carlosallexandre
Copy link
Contributor

@carlosallexandre carlosallexandre commented Nov 12, 2024

First of all, sorry for the PR size...

Motivation

Closes #575.

What it does?

  1. Turns scripts, such as watcher, hydrate and log-build into module, so we can call them "inside" the cli command instead of executing with node.
  2. Adds pino as a simple logger.
  3. Creates a package for all astro related files into packages/core/astro/. This adds a burden to us for install deps on user's .eventcatalog-core dir. It is handled here.
  4. Group all files related to the core/cli into packages/core/. The astro/ must be inside of core/ to turns the pack process simple. The files packaged are described into the files field on package.json (check here)

Changes into core/cli

  1. It rename scripts/* to scr/*
  2. It moves bin/eventcatalog.config.ts to config.d.ts
  3. It moves bin/eventcatalog.ts to src/eventcatalog.ts
  4. It turns eventcatalog.js into the bin file
  5. It moves the scripts/__tests__/** to test/** to simplify the tests location on vitest.config.ts

Changes into github actions

  1. Removes the test-bin workflow with docker and adds it as job into the verify-build workflow. This job will be executed in windows/ubuntu and with pnpm/npm.

It avoid copying the core to the user's directory when the
`.eventcatalog-core` already exists and has the same version
as the `@eventcatalog/core`.
It adds a simple logger that wraps Console. Based on the logLevel
enabled this logger decides between print or not the message.
It removes copyCore from preview command as it doesn't adds any
value.
It adds the options --project-dir and --ec-core-dir to define
the PROJECT_DIR (default to cwd) and CORE_DIR (default to cwd +
 `.eventcatalog-core`) respectively.
The test ci script is used by .github actions, keeping it under
.github makes more sense.
The images is used by the README.md.
Copy link

changeset-bot bot commented Nov 12, 2024

⚠️ No Changeset found

Latest commit: d9013a6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@carlosallexandre carlosallexandre marked this pull request as ready for review November 12, 2024 18:21
@carlosallexandre
Copy link
Contributor Author

Closing in favor of small PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue building empty template project with pnpm package manager
1 participant