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(core): Standardize filename casing for controllers and databases (no-changelog) #10564

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Aug 27, 2024

Follow-up to: #10527

Pending for next pass:

  • cli/src/PublicApi
  • cli/src/services
  • cli/test

…ases (no-changelog)

Follow-up to: #10527

Pending for next pass:
- `cli/src/PublicApi`
- `cli/src/services`
- `cli/test`
@@ -6,7 +6,7 @@ import { DataSource as Connection } from '@n8n/typeorm';
import { ErrorReporterProxy as ErrorReporter } from 'n8n-workflow';

import { inTest } from '@/constants';
import { wrapMigration } from '@db/utils/migrationHelpers';
import { wrapMigration } from '@/databases/utils/migration-helpers';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@db@/databases comes automatically from symbol rename via Intellisense. We can change it back to @db if need be.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have just one alias and stick to that

Copy link
Contributor Author

@ivov ivov Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will need a lint rule to enforce. Right now, Intellisense sometimes autocompletes imports with relative imports, sometimes with @/databases but apparently never with the @db alias, likely that one is always manual.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started with @db because I think I wanted to extract all DB stuff out into a separate package. I don't know if any of the reasons I had back then make sense anymore.
perhaps we should just drop @db and replace it all with @/databases.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Aug 27, 2024
@ivov
Copy link
Contributor Author

ivov commented Aug 27, 2024

For future reference, to fix filename casing in case-insensitive OS:

git mv src/databases/entities/Settings.ts src/databases/entities/settings.ts
git mv src/databases/entities/Project.ts src/databases/entities/project.ts

@ivov ivov marked this pull request as ready for review August 27, 2024 07:49
@ivov ivov requested a review from a team as a code owner August 27, 2024 07:49
@ivov ivov requested a review from netroy August 27, 2024 14:05
Copy link

cypress bot commented Aug 27, 2024

n8n    Run #6623

Run Properties:  status check passed Passed #6623  •  git commit aa335321ac: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Project n8n
Branch Review standardize-filenames-in-controllers-and-databases
Run status status check passed Passed #6623
Run duration 04m 45s
Commit git commit aa335321ac: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Committer Iván Ovejero
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 419
View all changes introduced in this branch ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@ivov ivov merged commit fd58a27 into master Aug 27, 2024
57 of 61 checks passed
@ivov ivov deleted the standardize-filenames-in-controllers-and-databases branch August 27, 2024 14:44
MiloradFilipovic added a commit that referenced this pull request Aug 27, 2024
* master:
  refactor(core): Use `@/databases/` instead of `@db/` (no-changelog) (#10573)
  ci: Fix destroy benchmark env workflow (no-changelog) (#10572)
  feat: Add benchmarking of pooled sqlite (no-changelog) (#10550)
  refactor(editor): User journey link to n8n.io (#10331)
  fix(Wait Node): Prevent waiting until invalid date (#10523)
  refactor(core): Standardize filename casing for controllers and databases (no-changelog) (#10564)
  refactor(core): Allow custom types on getCredentials (no-changelog) (#10567)
  fix(editor): Scale output item selector input width with value (#10555)
  refactor(core): Delete InternalHooks (no-changelog) (#10561)
  fix(core): Make boolean config value parsing backward-compatible (#10560)
  fix(Google Sheets Trigger Node): Show sheet name is too long error (#10542)
  fix(editor): Ensure `Datatable` component renders `All` option (#10525)
  fix(core): Stop explicit redis client disconnect on shutdown (#10551)
  ci: Use correct branch for benchmark docker build workflow (no-changelog) (#10552)
  refactor(core): Separate listeners in scaling service (no-changelog) (#10487)
ivov added a commit that referenced this pull request Aug 28, 2024
…PI (no-changelog)

Follow-up to #10564. YAML files in Public API intentionally omitted for now.

`cli` package completed. Next is setting up `unicorn/filename-case` to catch any stragglers.
@janober
Copy link
Member

janober commented Aug 28, 2024

Got released with n8n@1.57.0

MiloradFilipovic added a commit that referenced this pull request Aug 28, 2024
* master: (24 commits)
  feat(core): Switch to MJML for email templates (#10518)
  fix(Gmail Trigger Node): Don't return date instances, but date strings instead (#10582)
  fix(core): Deduplicate sentry events using error stacktraces instead (no-changelog) (#10590)
  feat(editor): Implement new app layout (#10548)
  refactor(core): Standardize filename casing for services and Public API (no-changelog) (#10579)
  🚀 Release 1.57.0 (#10587)
  fix(editor): Add tooltips to workflow history button (#10570)
  ci: Fix provenance generation during NPM publish (no-changelog) (#10586)
  feat(core): Expose queue metrics for Prometheus (#10559)
  refactor(core): Map out pubsub messages (no-changelog) (#10566)
  fix: Fix scenario prefix not being passed (no-changelog) (#10575)
  refactor(core): Convert `verbose` to `debug` logs (#10574)
  refactor(core): Use `@/databases/` instead of `@db/` (no-changelog) (#10573)
  ci: Fix destroy benchmark env workflow (no-changelog) (#10572)
  feat: Add benchmarking of pooled sqlite (no-changelog) (#10550)
  refactor(editor): User journey link to n8n.io (#10331)
  fix(Wait Node): Prevent waiting until invalid date (#10523)
  refactor(core): Standardize filename casing for controllers and databases (no-changelog) (#10564)
  refactor(core): Allow custom types on getCredentials (no-changelog) (#10567)
  fix(editor): Scale output item selector input width with value (#10555)
  ...

# Conflicts:
#	packages/editor-ui/src/stores/assistant.store.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants