Skip to content
Open
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
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: added

Add a tsconfig paths alias and typecheck script so internal packages/* resolve for types/IDE.
2 changes: 2 additions & 0 deletions projects/packages/premium-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"build": "wp-build && mkdir -p build/modules/boot && cp shims/boot-asset.php build/modules/boot/index.min.asset.php",
"build-production": "NODE_ENV=production wp-build && mkdir -p build/modules/boot && cp shims/boot-asset.php build/modules/boot/index.min.asset.php",
"typecheck": "tsgo --noEmit",
"watch": "wp-build --watch"
},
"wpPlugin": {
Expand Down Expand Up @@ -38,6 +39,7 @@
},
"devDependencies": {
"@babel/core": "7.29.0",
"@typescript/native-preview": "7.0.0-dev.20260225.1",
"@wordpress/build": "0.14.0",
"browserslist": "4.28.2"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"name": "_@jetpack-premium-analytics/init",
"name": "@automattic/jetpack-premium-analytics-init",
"version": "0.1.0",
"type": "module",
"wpScript": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"name": "_@jetpack-premium-analytics/dashboard-route",
"name": "@automattic/jetpack-premium-analytics-dashboard-route",
"route": {
"path": "/",
"page": "jetpack-premium-analytics"
Expand Down
9 changes: 9 additions & 0 deletions projects/packages/premium-analytics/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"extends": "jetpack-js-tools/tsconfig.base.json",
"compilerOptions": {
// Resolve cross-package imports between internal `packages/*` modules
// (`@jetpack-premium-analytics/<dir>`) to their TypeScript source for
// type-checking + IDE. The build resolves the same specifier separately (see
// README → "Internal packages"); this keeps tsc/esbuild and `tsgo` in sync.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems "Internal packages" doesn't exist.

"paths": {
"@jetpack-premium-analytics/*": [ "./packages/*/src" ]
Comment thread
manzoorwanijk marked this conversation as resolved.
}
},
"include": [ "routes/**/*", "packages/**/*" ]
}
Loading