Skip to content

Commit

Permalink
Support publishing packages and theia-trace-extension to NPM
Browse files Browse the repository at this point in the history
- Use lerna 4.0.0
- Add publishing scripts in package.json
- Update related information in relevant package.json files
- Add github action to publish next version using --canary lerna option

The publish commands will publish the following packages to NPM:

    traceviewer-base
    traceviewer-react-components
    theia-traceviewer

Fixes #429

Signed-off-by: Bernd Hufmann <[email protected]>
  • Loading branch information
bhufmann committed Sep 13, 2021
1 parent b30acf5 commit cb25b8a
Show file tree
Hide file tree
Showing 29 changed files with 2,319 additions and 634 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: NPM package (next)
on:
push:
branches: [ master ]
# release:
# types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
# Defaults to the user or organization that owns the workflow file
scope: '@theia-ide'
- run: yarn
- run: yarn publish:next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 13 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
.browser_modules
.idea
.metadata
*.log
build
examples
coverage
download
lerna-debug.log
node_modules
test-resources
trace-compass-server
2 changes: 1 addition & 1 deletion examples/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@theia/vsx-registry": "latest",
"@theia/keymaps": "latest",
"@theia/getting-started": "latest",
"theia-trace-viewer": "0.0.0"
"theia-traceviewer": "0.0.1"
},
"devDependencies": {
"@theia/cli": "latest"
Expand Down
2 changes: 1 addition & 1 deletion examples/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@theia/keymaps": "latest",
"@theia/getting-started": "latest",
"@theia/electron": "latest",
"theia-trace-viewer": "0.0.0"
"theia-traceviewer": "0.0.1"
},
"devDependencies": {
"@theia/cli": "latest",
Expand Down
6 changes: 3 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"lerna": "2.4.0",
"version": "0.0.0",
"lerna": "4.0.0",
"version": "0.0.1",
"useWorkspaces": true,
"npmClient": "yarn",
"command": {
"run": {
"stream": true
}
}
}
}
23 changes: 20 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tsbuild": "tsc -b",
"tswatch": "tsc -b -w",
"clean": "lerna run clean",
"prepare:packages": "lerna run --ignore=\"*-example-app\" --concurency=1 prepare",
"prepare:packages": "lerna run --ignore=\"*-example-app\" prepare",
"prepare:examples": "lerna run --scope=\"*-example-app\" --parallel prepare",
"rebuild:browser": "theia rebuild:browser",
"rebuild:electron": "theia rebuild:electron",
Expand All @@ -19,12 +19,29 @@
"start-all:browser": "yarn start:server & yarn start:browser",
"start-all:electron": "yarn start:server & yarn start:electron",
"lint": "lerna run lint",
"test": "lerna run test"
"test": "lerna run test",
"publish:latest": "lerna publish --registry=https://registry.npmjs.org/ --exact --no-git-tag-version --no-push",
"publish:next": "lerna publish --registry=https://registry.npmjs.org/ --exact --canary minor --preid=next.$(git rev-parse --short HEAD) --dist-tag=next --no-git-tag-version --no-push --yes"
},
"keywords": [
"theia-extension",
"trace-viewer",
"trace-analysis",
"tracing",
"trace"
],
"repository": {
"type": "git",
"url": "https://github.com/theia-ide/theia-trace-extension"
},
"bugs": {
"url": "https://github.com/theia-ide/theia-trace-extension/issues"
},
"homepage": "https://github.com/theia-ide/theia-trace-extension",
"devDependencies": {
"@theia/cli": "latest",
"jsonc-parser": "^3.0.0",
"lerna": "2.4.0"
"lerna": "4.0.0"
},
"workspaces": [
"examples/*",
Expand Down
19 changes: 19 additions & 0 deletions packages/base/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2019, 2021 Ericsson and others

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
13 changes: 9 additions & 4 deletions packages/base/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"name": "@trace-viewer/base",
"version": "0.0.0",
"description": "Trace Compass base package, contains trace management utilities",
"name": "traceviewer-base",
"version": "0.0.1",
"description": "Trace Viewer base package, contains trace management utilities",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/theia-ide/theia-trace-extension"
},
"bugs": {
"url": "https://github.com/theia-ide/theia-trace-extension/issues"
},
"homepage": "https://github.com/theia-ide/theia-trace-extension",
"files": [
"lib",
"src"
Expand All @@ -30,5 +34,6 @@
"lint": "eslint .",
"test": "echo 'test'",
"watch": "tsc -w"
}
},
"gitHead": "4f93878b0ef9d58254a1f41daf99d03b4608df13"
}
19 changes: 19 additions & 0 deletions packages/react-components/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2019, 2021 Ericsson and others

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 3 additions & 3 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@trace-viewer/react-components",
"version": "0.0.0",
"name": "traceviewer-react-components",
"version": "0.0.1",
"description": "Trace Compass react components",
"license": "MIT",
"repository": {
Expand All @@ -16,7 +16,7 @@
"@fortawesome/fontawesome-svg-core": "^1.2.17",
"@fortawesome/free-solid-svg-icons": "^5.8.1",
"@fortawesome/react-fontawesome": "^0.1.4",
"@trace-viewer/base": "0.0.0",
"traceviewer-base": "0.0.1",
"ag-grid-community": "^23.1.0",
"ag-grid-react": "^23.1.0",
"chart.js": "^2.8.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { TspClient } from 'tsp-typescript-client/lib/protocol/tsp-client';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { TimeGraphUnitController } from 'timeline-chart/lib/time-graph-unit-controller';
import { TimeRange } from '@trace-viewer/base/lib/utils/time-range';
import { TimeRange } from 'traceviewer-base/lib/utils/time-range';
import { OutputComponentStyle } from './utils/output-component-style';
import { OutputStyleModel } from 'tsp-typescript-client/lib/models/styles';
import { TooltipComponent } from './tooltip-component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { TimelineChart } from 'timeline-chart/lib/time-graph-model';
import { QueryHelper } from 'tsp-typescript-client/lib/models/query/query-helper';
import { OutputElementStyle } from 'tsp-typescript-client/lib/models/styles';
import { Annotation, Type } from 'tsp-typescript-client/lib/models/annotation';
import { TimeRange } from '@trace-viewer/base/lib/utils/time-range';
import { TimeRange } from 'traceviewer-base/lib/utils/time-range';

enum ElementType {
STATE = 'state',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AgGridReact } from 'ag-grid-react';
import { ColDef, IDatasource, GridReadyEvent, CellClickedEvent, GridApi, ColumnApi, Column, RowNode } from 'ag-grid-community';
import { QueryHelper } from 'tsp-typescript-client/lib/models/query/query-helper';
import { cloneDeep } from 'lodash';
import { signalManager } from '@trace-viewer/base/lib/signals/signal-manager';
import { signalManager } from 'traceviewer-base/lib/signals/signal-manager';
import { TimelineChart } from 'timeline-chart/lib/time-graph-model';
import { CellKeyDownEvent } from 'ag-grid-community/dist/lib/events';
import { Line } from 'tsp-typescript-client/lib/models/table';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { TimeGraphRowController } from 'timeline-chart/lib/time-graph-row-contro
import { QueryHelper } from 'tsp-typescript-client/lib/models/query/query-helper';
import { ResponseStatus } from 'tsp-typescript-client/lib/models/response/responses';
import { TimeGraphEntry } from 'tsp-typescript-client/lib/models/timegraph';
import { signalManager, Signals } from '@trace-viewer/base/lib/signals/signal-manager';
import { signalManager, Signals } from 'traceviewer-base/lib/signals/signal-manager';
import { AbstractOutputProps, AbstractOutputState } from './abstract-output-component';
import { AbstractTreeOutputComponent } from './abstract-tree-output-component';
import { StyleProperties } from './data-providers/style-properties';
Expand All @@ -23,7 +23,7 @@ import { ReactTimeGraphContainer } from './utils/timegraph-container-component';
import { OutputElementStyle } from 'tsp-typescript-client/lib/models/styles';
import { EntryTree } from './utils/filtrer-tree/entry-tree';
import { listToTree, getAllExpandedNodeIds } from './utils/filtrer-tree/utils';
import hash from '@trace-viewer/base/lib/utils/value-hash';
import hash from 'traceviewer-base/lib/utils/value-hash';
import ColumnHeader from './utils/filtrer-tree/column-header';
import { TimeGraphAnnotationComponent } from 'timeline-chart/lib/components/time-graph-annotation';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { TimeGraphUnitController } from 'timeline-chart/lib/time-graph-unit-cont
import { OutputDescriptor } from 'tsp-typescript-client/lib/models/output-descriptor';
import { Experiment } from 'tsp-typescript-client/lib/models/experiment';
import { TspClient } from 'tsp-typescript-client/lib/protocol/tsp-client';
import { TimeRange } from '@trace-viewer/base/lib/utils/time-range';
import { TimeRange } from 'traceviewer-base/lib/utils/time-range';
import { TableOutputComponent } from './table-output-component';
import { TimegraphOutputComponent } from './timegraph-output-component';
import { OutputComponentStyle } from './utils/output-component-style';
Expand All @@ -19,8 +19,8 @@ import { TimeNavigatorComponent } from './utils/time-navigator-component';
import { XYOutputComponent } from './xy-output-component';
import { NullOutputComponent } from './null-output-component';
import { AbstractOutputProps } from './abstract-output-component';
import * as Messages from '@trace-viewer/base/lib/message-manager';
import { signalManager, Signals } from '@trace-viewer/base/lib/signals/signal-manager';
import * as Messages from 'traceviewer-base/lib/message-manager';
import { signalManager, Signals } from 'traceviewer-base/lib/signals/signal-manager';
import ReactTooltip from 'react-tooltip';
import { TooltipComponent } from './tooltip-component';
import { remove } from 'lodash';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as React from 'react';
import { List, ListRowProps, Index, AutoSizer } from 'react-virtualized';
import { Experiment } from 'tsp-typescript-client/lib/models/experiment';
import { ExperimentManager } from '@trace-viewer/base/lib/experiment-manager';
import { signalManager, Signals } from '@trace-viewer/base/lib/signals/signal-manager';
import { ExperimentManager } from 'traceviewer-base/lib/experiment-manager';
import { signalManager, Signals } from 'traceviewer-base/lib/signals/signal-manager';
import ReactModal from 'react-modal';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCopy } from '@fortawesome/free-solid-svg-icons';
import { OpenedTracesUpdatedSignalPayload } from '@trace-viewer/base/lib/signals/opened-traces-updated-signal-payload';
import { ITspClientProvider } from '@trace-viewer/base/lib/tsp-client-provider';
import { OpenedTracesUpdatedSignalPayload } from 'traceviewer-base/lib/signals/opened-traces-updated-signal-payload';
import { ITspClientProvider } from 'traceviewer-base/lib/tsp-client-provider';

export interface ReactOpenTracesWidgetProps {
id: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import { List, ListRowProps, AutoSizer } from 'react-virtualized';
import { OutputAddedSignalPayload } from '@trace-viewer/base/lib/signals/output-added-signal-payload';
import { signalManager, Signals } from '@trace-viewer/base/lib/signals/signal-manager';
import { OutputAddedSignalPayload } from 'traceviewer-base/lib/signals/output-added-signal-payload';
import { signalManager, Signals } from 'traceviewer-base/lib/signals/signal-manager';
import { OutputDescriptor } from 'tsp-typescript-client/lib/models/output-descriptor';
import { Experiment } from 'tsp-typescript-client/lib/models/experiment';
import { ITspClientProvider } from '@trace-viewer/base/lib/tsp-client-provider';
import { ExperimentManager } from '@trace-viewer/base/lib/experiment-manager';
import { ITspClientProvider } from 'traceviewer-base/lib/tsp-client-provider';
import { ExperimentManager } from 'traceviewer-base/lib/experiment-manager';

export interface ReactAvailableViewsProps {
id: string,
Expand Down
19 changes: 19 additions & 0 deletions theia-extensions/viewer-prototype/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2019, 2021 Ericsson and others

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
11 changes: 5 additions & 6 deletions theia-extensions/viewer-prototype/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "theia-trace-viewer",
"private": "true",
"version": "0.0.0",
"description": "Trace Compass trace viewer Theia Extension",
"name": "theia-traceviewer",
"version": "0.0.1",
"description": "Trace Viewer Theia Extension",
"keywords": [
"theia-extension"
],
Expand All @@ -16,11 +15,11 @@
"src"
],
"dependencies": {
"@trace-viewer/base": "0.0.0",
"@trace-viewer/react-components": "0.0.0",
"@theia/core": "latest",
"@theia/editor": "latest",
"@theia/filesystem": "latest",
"traceviewer-base": "0.0.1",
"traceviewer-react-components": "0.0.1",
"tree-kill": "latest"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Messages from '@trace-viewer/base/lib/message-manager';
import * as Messages from 'traceviewer-base/lib/message-manager';
import { inject, injectable } from 'inversify';
import { StatusBar, StatusBarAlignment } from '@theia/core/lib/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { inject, injectable, postConstruct } from 'inversify';
import { ReactWidget, Widget } from '@theia/core/lib/browser';
import * as React from 'react';
import { Experiment } from 'tsp-typescript-client/lib/models/experiment';
import { ExperimentManager } from '@trace-viewer/base/lib/experiment-manager';
import { ExperimentManager } from 'traceviewer-base/lib/experiment-manager';
import { CommandService } from '@theia/core';
import { TspClientProvider } from '../../tsp-client-provider-impl';
import { signalManager} from '@trace-viewer/base/lib/signals/signal-manager';
import { signalManager} from 'traceviewer-base/lib/signals/signal-manager';
import { TraceExplorerTooltipWidget } from './trace-explorer-tooltip-widget';
import { ContextMenuRenderer } from '@theia/core/lib/browser';
import { TraceViewerCommand } from '../../trace-viewer/trace-viewer-commands';
import { ReactOpenTracesWidget} from '@trace-viewer/react-components/lib/trace-explorer/trace-explorer-opened-traces-widget';
import { ReactOpenTracesWidget} from 'traceviewer-react-components/lib/trace-explorer/trace-explorer-opened-traces-widget';
import { TraceExplorerMenus } from '../trace-explorer-commands';

@injectable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ReactWidget, Message } from '@theia/core/lib/browser';
import * as React from 'react';
import { EditorOpenerOptions, EditorManager } from '@theia/editor/lib/browser';
import URI from '@theia/core/lib/common/uri';
import { Signals, signalManager } from '@trace-viewer/base/lib/signals/signal-manager';
import { Signals, signalManager } from 'traceviewer-base/lib/signals/signal-manager';

@injectable()
export class TraceExplorerTooltipWidget extends ReactWidget {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { inject, injectable, postConstruct } from 'inversify';
import { ReactWidget, Widget, Message } from '@theia/core/lib/browser';
import { TspClientProvider } from '../../tsp-client-provider-impl';
import * as React from 'react';
import { ReactAvailableViewsWidget} from '@trace-viewer/react-components/lib/trace-explorer/trace-explorer-views-widget';
import { ReactAvailableViewsWidget} from 'traceviewer-react-components/lib/trace-explorer/trace-explorer-views-widget';

@injectable()
export class TraceExplorerViewsWidget extends ReactWidget {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ViewContainer, BaseWidget, Message, PanelLayout } from '@theia/core/lib
import { TraceExplorerTooltipWidget } from './trace-explorer-sub-widgets/trace-explorer-tooltip-widget';
import { TraceExplorerOpenedTracesWidget } from './trace-explorer-sub-widgets/trace-explorer-opened-traces-widget';
import { TraceExplorerPlaceholderWidget } from './trace-explorer-sub-widgets/trace-explorer-placeholder-widget';
import { signalManager, Signals } from '@trace-viewer/base/lib/signals/signal-manager';
import { OpenedTracesUpdatedSignalPayload } from '@trace-viewer/base/src/signals/opened-traces-updated-signal-payload';
import { signalManager, Signals } from 'traceviewer-base/lib/signals/signal-manager';
import { OpenedTracesUpdatedSignalPayload } from 'traceviewer-base/src/signals/opened-traces-updated-signal-payload';

@injectable()
export class TraceExplorerWidget extends BaseWidget {
Expand Down
Loading

0 comments on commit cb25b8a

Please sign in to comment.