Skip to content

Commit

Permalink
Release v1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
imtuanpham committed May 9, 2024
1 parent 5e0501c commit a83846a
Show file tree
Hide file tree
Showing 280 changed files with 5,137 additions and 16,206 deletions.
286 changes: 286 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
default:
image: dockerhub.sisense.com/node:18.16.0
tags:
- k8s

# Just cache ".yarn/cache" and avoid caching "node_modules":
# https://github.com/yarnpkg/berry/discussions/2621#discussioncomment-505872
cache:
key: $CI_COMMIT_REF_NAME
paths:
- .yarn/cache

before_script:
- yarn --version
# These directories _might_ be restored (not guaranteed) from a previously created cache.
#
# These directories are restored from a previous cache when this Job is running on a
# GitLab Runner that has already has a cache for our configured cache key.
#
# For transparency, always print out how many subdirectories are in these directories,
# so that it is obvious in the GitLab logs whether this Job ran with these files initially
# restored from a cache or not.
- '(ls .yarn/cache || true) | wc -l'

# If there is an open MR, do not run the branch pipeline. Run the merge request
# pipeline instead.
# https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH

# The GL_RELEASE_BOT_USER_NAME value used below references the bot user created
# with the project access token.
# More on bot users/project access tokens: https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html#bot-users-for-projects
.configure_git: &configure_git |-
echo 'Git client is being configured...'
git remote set-url origin "https://${GL_RELEASE_BOT_USER_NAME}:${GITLAB_TOKEN}@gitlab.sisense.com/${CI_PROJECT_PATH}.git"
git config user.name "${GL_RELEASE_BOT_USER_NAME}"
git config user.email "${GL_RELEASE_BOT_USER_EMAIL}"
git config --add push.pushOption ci.skip
git fetch
git checkout --force -B "${CI_COMMIT_BRANCH}" "origin/${CI_COMMIT_BRANCH}"
git reset --hard
git clean -fdx
git status
echo 'Git client is configured successfully'

stages:
- test
- publish
- external
- security

lint-commits:
stage: test
script:
- yarn install --immutable
- ./ci/lint_commits.sh
rules:
- if: $CI_COMMIT_AUTHOR == "svc_whitesource <[email protected]>"
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH != "external-main"
tags:
- build-nodejs

audit:
stage: test
rules:
- if: $CI_COMMIT_BRANCH != "external-main"
script:
- yarn npm audit --environment production
tags:
- build-nodejs

unit-tests:
stage: test
rules:
- if: $CI_COMMIT_BRANCH != "external-main"
script:
- yarn install --immutable
- yarn build:prod
- yarn test:coverage:combine
coverage: /^(?:Branches)\s*:\s*([^%]+)/
tags:
- build-nodejs
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml

component-tests:
stage: test
rules:
- if: $CI_COMMIT_BRANCH != "external-main"
image: mcr.microsoft.com/playwright:v1.36.2-jammy
script:
- yarn install --immutable
- yarn build:prod
- yarn test:ct

coverage: /^(?:Branches)\s*:\s*([^%]+)/
tags:
- build-nodejs
artifacts:
when: always
paths:
- e2e/playwright-report/
- e2e/test-results/
- e2e/results.xml
reports:
junit: e2e/results.xml
expire_in: 1 week

report:
stage: test
rules:
- if: $CI_COMMIT_BRANCH != "external-main"
needs: ['component-tests']
script:
- mkdir -p public/$CI_PIPELINE_ID
- mv e2e/playwright-report/* public/$CI_PIPELINE_ID/
- ls -l public
artifacts:
name: '$CI_PIPELINE_ID'
when: always
paths:
- public
expire_in: 1 week
tags:
- build-nodejs

lint:
stage: test
rules:
- if: $CI_COMMIT_BRANCH != "external-main"
script:
- yarn install --immutable
- yarn build:prod
- yarn lint --quiet
tags:
- build-nodejs

format:check:
stage: test
rules:
- if: $CI_COMMIT_BRANCH != "external-main"
script:
- yarn install --immutable
- yarn format:check
tags:
- build-nodejs

docs:check:md:
stage: test
rules:
- if: $CI_COMMIT_BRANCH != "external-main"
script:
- yarn install --immutable
- yarn build:prod
- yarn docs:gen:md
- yarn docs:check:md
tags:
- build-nodejs

compile-demo:
stage: test
rules:
- if: $CI_COMMIT_BRANCH != "external-main"
script:
- yarn install --immutable
- yarn build:prod
- yarn workspace react-ts-demo tsc
- yarn workspace angular-demo build
- yarn workspace vue-ts-demo build
tags:
- build-nodejs

version-and-publish-to-npm:
stage: publish
when: manual
script:
- *configure_git
- yarn install --immutable
- yarn config unset npmAuthToken
- yarn version-and-publish "${BUMP_STRATEGY}"
variables:
BUMP_STRATEGY: patch
rules:
- if: $CI_COMMIT_BRANCH == "master"
tags:
- build-nodejs

pages:
stage: publish
environment: staging
script:
- yarn install --immutable
- yarn build:prod
- yarn docs:gen
- yarn workspace @sisense/sdk-ui build-storybook
- rm -rf public
- mv docs public
- mv packages/sdk-ui/storybook-static public/storybook-static
rules:
- if: $CI_COMMIT_BRANCH == "master"
changes:
- tsdoc.json
- typedoc.config.cjs
- quickstart.md
- quickstart-angular.md
- packages/sdk-data/**/*.ts
- packages/sdk-ui/**/*.{ts,tsx}
when: on_success
- if: $CI_COMMIT_BRANCH == "master"
when: manual
artifacts:
paths:
- public
tags:
- build-nodejs

storybook-deploy-s3:
variables:
environment: staging
stage: publish
script:
- yarn install --immutable
- yarn build:prod
- yarn workspace @sisense/sdk-ui build-storybook

# Deployment to S3
- apt-get update && apt-get install -y awscli
- aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
- aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
- aws s3 sync packages/sdk-ui/storybook-static/ s3://compose-sdk-internal-storybook --delete
rules:
- if: $CI_COMMIT_BRANCH == "master"
tags:
- build-nodejs

push-to-github:
stage: external
when: manual
script:
- *configure_git
- ./ci/sync-gitlab-to-github.sh
variables:
GITHUB_URL: [email protected]:sisense/compose-sdk-monorepo.git
rules:
- if: $CI_COMMIT_BRANCH == "external-main"
tags:
- build-nodejs

prerelease:
stage: publish
when: manual
script:
- yarn install --immutable
- yarn config set npmRegistryServer "https://artifactory.sisense.com/artifactory/api/npm/sisense-node-modules/"
- yarn config set npmAuthIdent "${NPM_REGISTRY_AUTH_TOKEN}"
- yarn workspaces foreach --since --recursive --no-private version prerelease --deferred
- yarn version apply --all --prerelease="alpha-${CI_COMMIT_SHORT_SHA}"
- yarn workspaces foreach --no-private --verbose --topological run build:prod
- yarn workspaces foreach --since --no-private npm publish --tolerate-republish
- echo 'The following prerelease versions have been published:'
- yarn workspaces foreach --since --recursive --no-private exec node -p "require('./package.json').name + ' - ' + require('./package.json').version"
except:
- master
tags:
- build-nodejs

security-code-scan:
allow_failure: true
stage: security
variables:
GIT_SSL_NO_VERIFY: 'true'
PROJECT_KEY: composesdk
before_script:
- curl -sfL 'https://raw.githubusercontent.com/orcasecurity/orca-cli/main/install.sh' | sh
script:
- orca-cli -p "${PROJECT_KEY}" fs scan "${CI_PROJECT_DIR}"
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [1.10.0] - 2024-05-09

### Added
- Implement `WidgetService.getWidgetModel()` in `@sisense/sdk-angular`

### Changed
- Adjust `@mui` and `@emotion` packages in `@sisense/sdk-ui` to work with React 17
- Refactor `Chart` to simplify steps of adding new chart types
- Upgrade `@sisense/sisense-charts` to 5.1.1
- Make improvements to the AI components and hooks (private beta): toggleable insights

## [1.9.0] - 2024-05-02

### Added
Expand Down
3 changes: 0 additions & 3 deletions docs-md/index-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ indexTopics:
- title: SDK-DATA
description: Composable queries
link: ./sdk-data
- title: SDK-CLI
description: Command-line tools
link: ./sdk-cli
---

# Compose SDK Modules
Expand Down
11 changes: 11 additions & 0 deletions docs-md/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [1.10.0] - 2024-05-09

### Added
- Implement `WidgetService.getWidgetModel()` in `@sisense/sdk-angular`

### Changed
- Adjust `@mui` and `@emotion` packages in `@sisense/sdk-ui` to work with React 17
- Refactor `Chart` to simplify steps of adding new chart types
- Upgrade `@sisense/sisense-charts` to 5.1.1
- Make improvements to the AI components and hooks (private beta): toggleable insights

## [1.9.0] - 2024-05-02

### Added
Expand Down
4 changes: 2 additions & 2 deletions docs-md/sdk/getting-started/quickstart-angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Use the `dataOptions` property (`ChartProps` interface) to assign table columns
```

> **Note:**
> Use `measureFactory.average()` from the example above to specify the `average` type aggregation on the `TimeofStay` category. This `measureFactory` utility is exported from the `@sisense/sdk-data` library and supports other aggregation types. See the [`measureFactory`](./modules/sdk-data/factories/namespace.measureFactory/index.md) documentation for more information.
> Use `measureFactory.average()` from the example above to specify the `average` type aggregation on the `TimeofStay` category. This `measureFactory` utility is exported from the `@sisense/sdk-data` library and supports other aggregation types. See the [`measureFactory`](../modules/sdk-data/factories/namespace.measureFactory/index.md) documentation for more information.

The following is a complete example of a rendered chart in an application.

Expand Down Expand Up @@ -330,7 +330,7 @@ Your first Compose SDK chart with Angular should look something like this:

![Line chart rendered by the Angular component](../img/angular-quickstart-chart-example.png)

See the [SISENSE_CONTEXT_CONFIG_TOKEN](./modules/sdk-ui-angular/contexts/variable.SISENSE_CONTEXT_CONFIG_TOKEN.md) and [ChartComponent](./modules/sdk-ui-angular/charts/class.ChartComponent.md) docs for more details on supported props.
See the [SISENSE_CONTEXT_CONFIG_TOKEN](../modules/sdk-ui-angular/contexts/variable.SISENSE_CONTEXT_CONFIG_TOKEN.md) and [ChartComponent](../modules/sdk-ui-angular/charts/class.ChartComponent.md) docs for more details on supported props.

## Next Steps

Expand Down
4 changes: 2 additions & 2 deletions docs-md/sdk/getting-started/quickstart-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Use the `dataOptions` property (`ChartProps` interface) to assign table columns
```

> **Note:**
> Use `measureFactory.average()` from the example above to specify the `average` type aggregation on the `UnitPriceDiscount` category. This `measureFactory` utility is exported from the `@sisense/sdk-data` library and supports other aggregation types. See the [`measureFactory`](./modules/sdk-data/factories/namespace.measureFactory/index.md) documentation for more information.
> Use `measureFactory.average()` from the example above to specify the `average` type aggregation on the `UnitPriceDiscount` category. This `measureFactory` utility is exported from the `@sisense/sdk-data` library and supports other aggregation types. See the [`measureFactory`](../modules/sdk-data/factories/namespace.measureFactory/index.md) documentation for more information.
The following is a complete example of a rendered chart in an application.

Expand Down Expand Up @@ -305,7 +305,7 @@ Your first Compose SDK chart with Vue should look something like this:

![Line chart rendered by the Vue component](../img/vue-quickstart-chart-example.png)

See the [SisenseContextProvider](./modules/sdk-ui-vue/contexts/class.SisenseContextProvider.md) and [Chart](./modules/sdk-ui-vue/charts/class.Chart.md) docs for more details on supported props.
See the [SisenseContextProvider](../modules/sdk-ui-vue/contexts/class.SisenseContextProvider.md) and [Chart](../modules/sdk-ui-vue/charts/class.Chart.md) docs for more details on supported props.

## Next Steps

Expand Down
6 changes: 3 additions & 3 deletions docs-md/sdk/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Use the `dataOptions` property (`ChartProps` interface) to assign table columns
```

> **Note**
> Use `measureFactory.sum()` from the example above to specify the `sum` type aggregation on the `Revenue` category. This `measureFactory` utility is exported from the `@sisense/sdk-data` library and supports other aggregation types. See the [`measureFactory`](./modules/sdk-data/namespaces/namespace.measureFactory/index.md) documentation for more information.
> Use `measureFactory.sum()` from the example above to specify the `sum` type aggregation on the `Revenue` category. This `measureFactory` utility is exported from the `@sisense/sdk-data` library and supports other aggregation types. See the [`measureFactory`](../modules/sdk-data/factories/namespace.measureFactory/index.md) documentation for more information.
The following is a complete example of a rendered chart in an application.

Expand Down Expand Up @@ -288,7 +288,7 @@ Your chart should look like this:

![Line chart rendered by the Chart component](../img/chart-data-source-example-2.png)

See the [SisenseContextProvider](./modules/sdk-ui/contexts/function.SisenseContextProvider.md) and [Chart](./modules/sdk-ui/charts/function.Chart.md) docs for more details on supported props.
See the [SisenseContextProvider](../modules/sdk-ui/contexts/function.SisenseContextProvider.md) and [Chart](../modules/sdk-ui/charts/function.Chart.md) docs for more details on supported props.

## Next Steps

Expand All @@ -298,4 +298,4 @@ For some ideas and examples, check out:

- [Compose SDK Playground](https://www.sisense.com/platform/compose-sdk/playground/)
- [Demo application for Compose SDK with React](https://csdk-react.sisense.com)
- [Chart Tutorial](./tutorials/tutorial-charts/index.md)
- [Chart Tutorial](../tutorials/tutorial-charts/index.md)
2 changes: 1 addition & 1 deletion docs-md/sdk/guides/ai-features/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To be considered for the beta program, please sign up at [www.sisense.com/get/ge

## Prerequisites

Here, we assume you already have a working project with the following. If you don't already have a working project, see the [React Quickstart](../../quickstart.md) to create one.
Here, we assume you already have a working project with the following. If you don't already have a working project, see the [Compose SDK Quickstart](../../getting-started) to create one.

- `@sisense/sdk-ui` version `1.6.0` or higher
- A Sisense Fusion instance:
Expand Down
Loading

0 comments on commit a83846a

Please sign in to comment.