Skip to content

Commit

Permalink
fix: remove dependency on pyroscope-oss git branch (#2143)
Browse files Browse the repository at this point in the history
* fix: remove dependency on pyroscope-oss git branch

also, fix repository entry in package.json

* fix: update versions of node (lts) and oauth2-mock-server

* fix: update dependencies

* fix: type issue

* fix: manually add css-loader dependency

* fix: manually add sass-loader dependency

* fix: type checks

* fix: aliases and workspaces
  • Loading branch information
darrenjaneczek authored Jul 24, 2023
1 parent f507bd7 commit b552ed5
Show file tree
Hide file tree
Showing 13 changed files with 12,382 additions and 2,240 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- name: Install Go
uses: actions/setup-go@v4
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- name: Install Go
uses: actions/setup-go@v4
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- run: yarn --frozen-lockfile
- name: Run type-check
Expand All @@ -33,7 +33,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- run: yarn --frozen-lockfile
- name: Run format
Expand All @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- run: yarn --frozen-lockfile
- name: Run lint
Expand All @@ -57,7 +57,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- run: yarn --frozen-lockfile
- name: Run build
Expand All @@ -69,7 +69,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- run: yarn --frozen-lockfile
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
cache: true
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
# setup docker buildx
- name: Set up QEMU
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
go-version: 1.19.10
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- name: Build image Phlare
run: make docker-image/pyroscope/build "BUILDX_ARGS=--cache-from=type=gha --cache-to=type=gha"
Expand All @@ -103,7 +103,7 @@ jobs:
go-version: 1.19.10
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- name: Login to GCR
uses: docker/login-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weekly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
node-version: lts/hydrogen
cache: yarn
- run: make frontend/build
- uses: goreleaser/goreleaser-action@v4
Expand Down
17 changes: 5 additions & 12 deletions og/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
"version": "0.37.2",
"license": "Apache-2.0",
"main": "webapp/javascript/components/FlameGraph/FlameGraphComponent/index.jsx",
"repository": {
"type": "git",
"url": "https://github.com/pyroscope-io/pyroscope.git"
},
"workspaces": [
"packages/*",
"webapp"
],
"scripts": {
"start": "lerna-watch @pyroscope/webapp",
"bootstrap": "lerna bootstrap && husky install",
Expand Down Expand Up @@ -134,7 +126,7 @@
"lint-staged": "^11.1.2",
"monaco-editor-webpack-plugin": "^1.9.0",
"npm-run-all": "^4.1.5",
"oauth2-mock-server": "^4.3.0",
"oauth2-mock-server": "^6.0.0",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"prettier": "^2.2.1",
"redux-mock-store": "^1.5.4",
Expand Down Expand Up @@ -281,7 +273,8 @@
"d3-selection": "3.0.0",
"semver": "^7.5.2"
},
"optionalDependencies": {
"@pyroscope/nodejs": "^0.2.5"
}
"workspaces": [
"packages/*",
"webapp"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,7 @@ type PlotWithCrosshairsSupport = jquery.flot.plot &
version: '1.0',
});
})(jQuery);

// TS1208: 'CrosshairSync.plugin.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file.
// Add an import, export, or an empty 'export {}' statement to make it a module.
export {};
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grafana-pyroscope",
"version": "0.0.1",
"repository": "[email protected]:grafana/phlare.git",
"repository": "[email protected]:grafana/pyroscope.git",
"author": "Grafana Labs",
"license": "AGPL-3.0-only",
"private": true,
Expand Down Expand Up @@ -80,10 +80,11 @@
"@szhsin/react-menu": "3.5.2",
"@types/file-saver": "^2.0.5",
"compression-streams-polyfill": "^0.1.4",
"css-loader": "^4.0.0",
"file-saver": "^2.0.5",
"graphviz-react": "^1.2.5",
"jquery": "^3.6.4",
"pyroscope-oss": "git+https://github.com/pyroscope-io/pyroscope.git#f710852",
"protobufjs": "^7.2.4",
"react": "^18.2.0",
"react-datepicker": "^4.7.0",
"react-debounce-input": "^3.2.5",
Expand All @@ -97,6 +98,10 @@
"react-redux": "^7.2.1",
"react-router-dom": "5.3.0",
"react-textarea-autosize": "8.3.0",
"sass-loader": "^9.0.2",
"zod": "^3.21.4"
}
},
"workspaces": [
"og"
]
}
4 changes: 4 additions & 0 deletions public/app/example.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ describe('noop', () => {
expect(true).toBe(true);
});
});

// TS1208: 'example.test.tsx' cannot be compiled under '--isolatedModules' because it is considered a global script file.
// Add an import, export, or an empty 'export {}' statement to make it a module.
export {};
File renamed without changes.
18 changes: 5 additions & 13 deletions scripts/webpack/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const {
dependencies: pyroOSSDeps,
} = require('../../node_modules/pyroscope-oss/package.json');
const { dependencies: pyroOSSDeps } = require('../../og/package.json');
const webpack = require('webpack');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');

Expand Down Expand Up @@ -99,23 +97,17 @@ module.exports = {
),

// Common
'@pyroscope/webapp': path.resolve(
__dirname,
'../../node_modules/pyroscope-oss/webapp'
),
'@pyroscope/webapp': path.resolve(__dirname, '../../og/webapp'),
'@pyroscope/flamegraph': path.resolve(
__dirname,
'../../node_modules/pyroscope-oss/packages/pyroscope-flamegraph'
'../../og/packages/pyroscope-flamegraph'
),
'@pyroscope/models': path.resolve(
__dirname,
'../../node_modules/pyroscope-oss/packages/pyroscope-models'
'../../og/packages/pyroscope-models'
),

'@webapp': path.resolve(
__dirname,
'../../node_modules/pyroscope-oss/webapp/javascript'
),
'@webapp': path.resolve(__dirname, '../../og/webapp/javascript'),

'@phlare': path.resolve(__dirname, '../../public/app'),
// Dependencies
Expand Down
20 changes: 6 additions & 14 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,10 @@
"plugins": [{ "name": "typescript-plugin-css-modules" }],
"paths": {
"@phlare/*": ["./public/app/*"],

"@pyroscope/webapp/*": ["./node_modules/pyroscope-oss/webapp/*"],
"@webapp/redux/*": [
"./node_modules/pyroscope-oss/webapp/javascript/redux/*"
],
"@pyroscope/flamegraph/*": [
"./node_modules/pyroscope-oss/packages/pyroscope-flamegraph/*"
],
"@pyroscope/models/*": [
"./node_modules/pyroscope-oss/packages/pyroscope-models/*"
],

"@pyroscope/webapp/*": ["./og/webapp/*"],
"@webapp/redux/*": ["./og/webapp/javascript/redux/*"],
"@pyroscope/flamegraph/*": ["./og/packages/pyroscope-flamegraph/*"],
"@pyroscope/models/*": ["./og/packages/pyroscope-models/*"],
"@webapp/components/ExportData": [
"./public/app/overrides/components/ExportData"
],
Expand Down Expand Up @@ -43,7 +35,7 @@
"@webapp/services/render": ["./public/app/overrides/services/render"],
"@webapp/services/tags": ["./public/app/overrides/services/tags"],
"@webapp/services/base": ["./public/app/overrides/services/base"],
"@webapp/*": ["./node_modules/pyroscope-oss/webapp/javascript/*"],
"@webapp/*": ["./og/webapp/javascript/*"],
"@mui/base/*": ["./node_modules/@mui/base/*"],
"zod": ["./node_modules/zod"]
},
Expand All @@ -70,6 +62,6 @@
"./node_modules/pyroscope-oss/lib/",
"./node_modules/pyroscope-oss/webapp/javascript/types",
"public",
"public/app/types.ts"
"public/app/types.d.ts"
]
}
Loading

0 comments on commit b552ed5

Please sign in to comment.