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

Include paraglide version in Reporting #3054

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tiny-suits-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inlang/paraglide-js": patch
---

Include paraglide version in reporting
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export const initCommand = new Command()
const logger = new Logger({ silent: false, prefix: false })

logger.box("Welcome to inlang Paraglide-JS 🪂")
telemetry.capture({ event: "PARAGLIDE-JS init started" })
telemetry.capture({
event: "PARAGLIDE-JS init started",
properties: { version: PARJS_PACKAGE_VERSION },
})

const ctx = {
logger,
Expand All @@ -49,11 +52,20 @@ export const initCommand = new Command()
const ctx2 = await enforcePackageJsonExists(ctx1)
const ctx3 = await initializeInlangProject(ctx2)
const ctx4 = await promptForOutdir(ctx3)
telemetry.capture({ event: "PARAGLIDE-JS init project initialized" })
telemetry.capture({
event: "PARAGLIDE-JS init project initialized",
properties: { version: PARJS_PACKAGE_VERSION },
})
const ctx5 = await addParaglideJsToDevDependencies(ctx4)
telemetry.capture({ event: "PARAGLIDE-JS init added to devDependencies" })
telemetry.capture({
event: "PARAGLIDE-JS init added to devDependencies",
properties: { version: PARJS_PACKAGE_VERSION },
})
const ctx6 = await addCompileStepToPackageJSON(ctx5)
telemetry.capture({ event: "PARAGLIDE-JS init added compile commands" })
telemetry.capture({
event: "PARAGLIDE-JS init added compile commands",
properties: { version: PARJS_PACKAGE_VERSION },
})
const ctx7 = await maybeChangeTsConfig(ctx6)
const ctx8 = await maybeAddSherlock(ctx7)
const ctx9 = await maybeAddNinja(ctx8)
Expand All @@ -67,7 +79,10 @@ export const initCommand = new Command()
)
}

telemetry.capture({ event: "PARAGLIDE-JS init finished" })
telemetry.capture({
event: "PARAGLIDE-JS init finished",
properties: { version: PARJS_PACKAGE_VERSION },
})

const absoluteSettingsPath = nodePath.resolve(ctx9.projectPath, "settings.json")
const relativeSettingsFilePath = absoluteSettingsPath.replace(process.cwd(), ".")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const compile = async (args: CompileOptions): Promise<Record<string, stri
{
event: "PARAGLIDE-JS compile executed",
properties: {
version: PARJS_PACKAGE_VERSION,
stack,
},
},
Expand Down
Loading