-
Notifications
You must be signed in to change notification settings - Fork 0
Code Review Bench PR #25813 - Renamed files to kebab-case - core - services - part 2 #8
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| const DonationServiceWrapper = require('./DonationServiceWrapper'); | ||
| const DonationServiceWrapper = require('./donation-service-wrapper'); | ||
|
|
||
| module.exports = new DonationServiceWrapper(); |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,12 +8,12 @@ class EmailAnalyticsServiceWrapper { | |||||||
| return; | ||||||||
| } | ||||||||
|
|
||||||||
| const EmailAnalyticsService = require('./EmailAnalyticsService'); | ||||||||
| const EmailEventStorage = require('../email-service/EmailEventStorage'); | ||||||||
| const EmailEventProcessor = require('../email-service/EmailEventProcessor'); | ||||||||
| const MailgunProvider = require('./EmailAnalyticsProviderMailgun'); | ||||||||
| const EmailAnalyticsService = require('./email-analytics-service'); | ||||||||
| const EmailEventStorage = require('../email-service/email-event-storage'); | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 Bug: Broken requires: email-event-storage/processor files not renamedIn On case-insensitive filesystems (macOS) this might not surface during local development, but it will fail on case-sensitive filesystems (Linux, CI, production). Was this helpful? React with 👍 / 👎
Suggested change
|
||||||||
| const EmailEventProcessor = require('../email-service/email-event-processor'); | ||||||||
| const MailgunProvider = require('./email-analytics-provider-mailgun'); | ||||||||
| const {EmailRecipientFailure, EmailSpamComplaintEvent, Email} = require('../../models'); | ||||||||
| const StartEmailAnalyticsJobEvent = require('./events/StartEmailAnalyticsJobEvent'); | ||||||||
| const StartEmailAnalyticsJobEvent = require('./events/start-email-analytics-job-event'); | ||||||||
| const domainEvents = require('@tryghost/domain-events'); | ||||||||
| const settings = require('../../../shared/settings-cache'); | ||||||||
| const labs = require('../../../shared/labs'); | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| const EmailAnalyticsServiceWrapper = require('./EmailAnalyticsServiceWrapper'); | ||
| const EmailAnalyticsServiceWrapper = require('./email-analytics-service-wrapper'); | ||
|
|
||
| module.exports = new EmailAnalyticsServiceWrapper(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| module.exports = require('./IdentityTokenServiceWrapper'); | ||
| module.exports = require('./identity-token-service-wrapper'); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| const path = require('path'); | ||
| const urlUtils = require('../../../shared/url-utils'); | ||
| const settingsCache = require('../../../shared/settings-cache'); | ||
| const EmailContentGenerator = require('../lib/EmailContentGenerator'); | ||
| const EmailContentGenerator = require('../lib/email-content-generator'); | ||
|
|
||
| const emailContentGenerator = new EmailContentGenerator({ | ||
| getSiteUrl: () => urlUtils.urlFor('home', true), | ||
| getSiteTitle: () => settingsCache.get('title'), | ||
| templatesDir: path.resolve(__dirname, '..', 'mail', 'templates') | ||
| }); | ||
|
|
||
| exports.GhostMailer = require('./GhostMailer'); | ||
| exports.GhostMailer = require('./ghost-mailer'); | ||
| exports.utils = { | ||
| generateContent: emailContentGenerator.getContent.bind(emailContentGenerator) | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 Bug: Broken require: DonationBookshelfRepository renamed but ref not updated
The file
DonationBookshelfRepository.tswas renamed todonation-bookshelf-repository.tsin this PR, butdonation-service-wrapper.js(line 11) still containsrequire('./DonationBookshelfRepository'). Since the file no longer exists at the PascalCase path, this will cause aMODULE_NOT_FOUNDerror when the donation service initializes.The fix is to update the require in
donation-service-wrapper.jsto use the new kebab-case filename:Was this helpful? React with 👍 / 👎