Skip to content

Commit d41f83d

Browse files
fix changeset dependency publishing (#3145)
## Summary highlight.run package issue [reported in intercom ](https://app.intercom.com/a/inbox/gm6369ty/inbox/shared/all/conversation/41114?view=List) `workspace:*` syntax does not bundle dependencies but instead expects the dependent package to be published. For example, `highlight.run` would be depending on `@highlight-run/client`, but that package is not published. changesets/changesets#432 Instead, use [bundledDependencies](https://classic.yarnpkg.com/lang/en/docs/dependency-types/#toc-bundleddependencies) to have yarn package dependencies into each package. ## How did you test this change? `yarn build:all` locally and `yalc publish` to try the `highlight.run` package locally. before, i would receive an error running `yarn`. no longer seeing the error. ## Are there any deployment considerations? Will test published npm package.
1 parent 4f0e7d8 commit d41f83d

20 files changed

Lines changed: 102 additions & 915 deletions

‎.gitattributes‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ go.sum linguist-generated=true
44
go.mod linguist-generated=true
55
/.yarn/releases/** binary
66
/.yarn/plugins/** binary
7+
/yarn.lock binary
8+

‎.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs‎

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

‎.yarnrc.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
nodeLinker: node-modules
22

3+
plugins:
4+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
5+
spec: '@yarnpkg/plugin-workspace-tools'
6+
37
yarnPath: .yarn/releases/yarn-3.2.3.cjs

‎client/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"module": "dist/indexESM.js",
88
"types": "dist/src/index.d.ts",
99
"scripts": {
10-
"build": "tsc && rollup -c",
10+
"build": "yarn types && rollup -c",
11+
"types": "tsc",
1112
"dev": "doppler run -- rollup -c -w",
1213
"dev:gql": "graphql-codegen --config --watch codegen.yml",
1314
"codegen": "graphql-codegen --config codegen.yml",

‎firstload/.babelrc‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎firstload/CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# highlight.run
2+
3+
## 4.6.0
4+
5+
### Minor Changes
6+
7+
- fix workspace:\* dependencies

‎firstload/jest.config.js‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎firstload/package.json‎

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
{
22
"name": "highlight.run",
3-
"version": "4.5.1",
3+
"version": "4.5.2",
44
"scripts": {
55
"build": "tsc && rollup -c",
6-
"dev": "doppler run -- rollup -c -w",
7-
"test": "jest --detectOpenHandles"
6+
"dev": "doppler run -- rollup -c -w"
87
},
98
"main": "dist/index.js",
109
"module": "dist/indexESM.js",
1110
"types": "dist/src/index.d.ts",
1211
"license": "MIT",
13-
"dependencies": {
14-
"@highlight-run/client": "workspace:*"
15-
},
1612
"devDependencies": {
17-
"@babel/preset-env": "^7.19.1",
18-
"@babel/preset-typescript": "^7.18.6",
1913
"@rollup/plugin-commonjs": "^22.0.1",
2014
"@rollup/plugin-json": "^4.1.0",
2115
"@rollup/plugin-node-resolve": "^13.3.0",
2216
"@rollup/plugin-replace": "^4.0.0",
2317
"@types/chrome": "^0.0.144",
24-
"@types/jest": "^26.0.24",
2518
"esbuild": "^0.14.47",
26-
"jest": "^27.0.6",
27-
"jest-fail-on-console": "^2.0.4",
2819
"rollup": "^2.75.7",
2920
"rollup-plugin-consts": "^1.1.0",
3021
"rollup-plugin-esbuild": "^4.9.1",
@@ -33,8 +24,5 @@
3324
"rollup-plugin-web-worker-loader": "^1.6.1",
3425
"tslib": "^2.4.0",
3526
"typescript": "^4.0.3"
36-
},
37-
"setupFiles": [
38-
"./tests/jest.overrides.js"
39-
]
27+
}
4028
}

‎firstload/rollup.config.js‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,6 @@ if (development) {
7878
sourcemap: sourceMap,
7979
},
8080
},
81-
{
82-
input: {
83-
indexCJS: input.index,
84-
electronCJS: input.electron,
85-
},
86-
output: {
87-
dir: './dist',
88-
format: 'cjs',
89-
exports: 'auto',
90-
sourcemap: sourceMap,
91-
},
92-
},
9381
]) {
9482
rollupBuilds.push({
9583
input: x.input,

‎firstload/src/index.tsx‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,30 @@ import {
66
} from './integrations/amplitude'
77
import { MixpanelAPI, setupMixpanelIntegration } from './integrations/mixpanel'
88
import { initializeFetchListener } from './listeners/fetch'
9-
import {
10-
FirstLoadListeners,
11-
GenerateSecureID,
9+
import { GenerateSecureID } from '../../client/src/utils/secure-id'
10+
import { FirstLoadListeners } from '../../client/src/listeners/first-load-listeners'
11+
import { getPreviousSessionData } from '../../client/src/utils/sessionStorage/highlightSession'
12+
import type {
1213
Highlight,
1314
HighlightClassOptions,
1415
HighlightOptions,
1516
HighlightPublicInterface,
1617
Metadata,
1718
Metric,
18-
MetricCategory,
1919
SessionDetails,
20-
getPreviousSessionData,
2120
} from '@highlight-run/client'
2221
import HighlightSegmentMiddleware from './integrations/segment'
2322
import configureElectronHighlight from './environments/electron'
2423

2524
initializeFetchListener()
2625

26+
export enum MetricCategory {
27+
Device = 'Device',
28+
WebVital = 'WebVital',
29+
Frontend = 'Frontend',
30+
Backend = 'Backend',
31+
}
32+
2733
const HighlightWarning = (context: string, msg: any) => {
2834
console.warn(`Highlight Warning: (${context}): `, msg)
2935
}

0 commit comments

Comments
 (0)