Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #13

Merged
merged 13 commits into from
Jul 15, 2024
Merged
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
27 changes: 27 additions & 0 deletions .github/actions/assert-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Assert Assets Exists
description: Build the package and assert that file contents exist as we expect
runs:
using: "composite"
steps:
- name: Build and Assert Output
shell: bash
run: |-
echo '
target: ember-apache-echarts/
setup:
run: pnpm build
cwd: ./ember-apache-echarts
expect: |
dist/index.mjs
dist/index.mjs.map
declarations/index.d.ts


' >> assert-contents.config.yml
npx assert-folder-contents

- name: Upload dist assets to cache
uses: actions/upload-artifact@v4
with:
name: dist
path: ${{ env.dist }}
10 changes: 10 additions & 0 deletions .github/actions/download-built-package/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Download built package from cache
description: Download built package from cache
runs:
using: "composite"
steps:
- name: Download built package from cache
uses: actions/download-artifact@v4
with:
name: dist
path: ${{ env.dist }}
127 changes: 94 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,87 @@ on:
push:
branches:
- main
tags:
- '*'
pull_request:
pull_request: {}
merge_group:
types: [checks_requested]

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
CI: true
dist: ember-apache-echarts/dist

jobs:
test:
name: Tests
install_dependencies:
name: Install
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Setup node.js
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 16
cache: 'pnpm'
- name: Setup pnpm cache
uses: actions/cache@v3
node-version: 18.18.1

lint:
name: Lint
runs-on: ubuntu-latest
needs: [install_dependencies]
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
path: |
node_modules
*/node_modules
key: node_modules-${{runner.os}}-${{hashFiles('**/pnpm-lock.yaml')}}-v2
- name: Install dependencies
run: CI=true pnpm i --frozen-lockfile
node-version: 18.18.1
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test


build:
name: Build Tests
needs: [install_dependencies]
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- uses: ./.github/actions/assert-build

default_tests:
name: Default Tests
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- uses: ./.github/actions/download-built-package
- run: pnpm --filter test-app test:ember

floating_tests:
name: Floating Deps Test
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
args: '--no-lockfile'
- uses: ./.github/actions/download-built-package
- run: pnpm i -f
- run: pnpm --filter test-app test:ember


try_scenarios:
name: ${{ matrix.try-scenario }}
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [test]
needs: [default_tests]

strategy:
fail-fast: false
Expand All @@ -51,24 +95,41 @@ jobs:
- ember-4.4
- ember-4.8
- ember-4.12
- ember-5.4
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized

steps:
- name: Setup pnpm cache
uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
path: |
node_modules
*/node_modules
key: node_modules-${{runner.os}}-${{hashFiles('**/pnpm-lock.yaml')}}-v2
- name: Install dependencies
run: CI=true pnpm i --frozen-lockfile
- name: Test
node-version: 18.18.1
- uses: ./.github/actions/download-built-package
- name: Run Tests
working-directory: ./test-app
run: >-
node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
--skip-cleanup
working-directory: ./test-app

MeasureAssetSizes:
name: Measure Asset Sizes
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- uses: ./.github/actions/download-built-package
- name: measure asset sizes
run: node ./dev/estimate-bytes/index.js
- name: comment on PR
uses: marocchino/sticky-pull-request-comment@v2
with:
header: asset-sizes
path: ./dev/estimate-bytes/comment.txt
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ jobs:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Setup node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: 'pnpm'
- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
node_modules
Expand Down
45 changes: 23 additions & 22 deletions ember-apache-echarts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-apache-echarts",
"version": "0.5.0",
"version": "0.6.0",
"description": "Echarts for Ember",
"keywords": [
"ember-addon"
Expand Down Expand Up @@ -33,45 +33,46 @@
"prepare": "pnpm build"
},
"dependencies": {
"@ember/render-modifiers": "^2.0.0",
"@embroider/addon-shim": "^1.0.0",
"@ember/render-modifiers": "^2.1.0",
"@embroider/addon-shim": "^1.8.9",
"@glimmer/component": "^1.1.2",
"echarts": "^5.3.2",
"echarts": "^5.5.1",
"ember-cli-string-helpers": "^6.1.0",
"ember-lodash": "^4.19.5",
"ember-modifier": "^3.2.7",
"ember-style-modifier": "^3.0.1",
"ember-truth-helpers": "^3.1.1",
"inputmask": "^5.0.7",
"ember-modifier": "^4.2.0",
"ember-style-modifier": "^4.3.1",
"ember-truth-helpers": "^4.0.3",
"inputmask": "^5.0.9",
"lodash-es": "^4.17.21"
},
"devDependencies": {
"@babel/core": "7.22.15",
"@babel/core": "7.22.20",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.22.15",
"@embroider/addon-dev": "4.1.0",
"@optimize-lodash/rollup-plugin": "^4.0.3",
"@rollup/plugin-babel": "^6.0.3",
"@babel/plugin-proposal-decorators": "7.24.7",
"@embroider/addon-dev": "4.3.1",
"@optimize-lodash/rollup-plugin": "^4.0.4",
"@rollup/plugin-babel": "^6.0.4",
"babel-eslint": "10.1.0",
"ember-template-lint": "5.11.2",
"eslint": "8.48.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-ember": "11.11.1",
"ember-template-lint": "5.13.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-ember": "11.12.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-qunit": "8.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-qunit": "8.0.1",
"npm-run-all": "4.1.5",
"rollup": "3.29.0"
"rollup": "4.18.1"
},
"peerDependencies": {
"@ember/string": ">=3.1.1",
"@ember/string": ">=4.0.0",
"ember-source": ">=5.0.0"
},
"engines": {
"node": ">= 16.15.1",
"yarn": "use pnpm",
"npm": "use pnpm"
},
"packageManager": "[email protected]",
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
Expand Down Expand Up @@ -109,7 +110,7 @@
"./utils/style/format-css-style-value.js": "./dist/_app_/utils/style/format-css-style-value.js",
"./utils/style/parse-css-style-value.js": "./dist/_app_/utils/style/parse-css-style-value.js",
"./utils/style/resolve-style.js": "./dist/_app_/utils/style/resolve-style.js",
"./_rollupPluginBabelHelpers-7ae2993d.js": "./dist/_app_/_rollupPluginBabelHelpers-7ae2993d.js"
"./_rollupPluginBabelHelpers-BRnyJ4b7.js": "./dist/_app_/_rollupPluginBabelHelpers-BRnyJ4b7.js"
}
}
}
2 changes: 1 addition & 1 deletion ember-apache-echarts/src/helpers/css-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export default helper(function cssSize(positional /*, named*/) {
? size.toString() !== '0'
? `${size}px`
: '0'
: size ?? '0';
: (size ?? '0');
});
8 changes: 4 additions & 4 deletions ember-apache-echarts/src/modifiers/bar-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@ export default class BarChartModifier extends AbstractChartModifier {
categoryAxisScale === 'shared'
? context.data.categories[dataIndex]
: series.data[dataIndex]
? series.data[dataIndex][
args.categoryProperty ?? DEFAULT_CATEGORY_PROPERTY
]
: null;
? series.data[dataIndex][
args.categoryProperty ?? DEFAULT_CATEGORY_PROPERTY
]
: null;

if (name) {
chart.dispatchAction({
Expand Down
4 changes: 2 additions & 2 deletions ember-apache-echarts/src/utils/style/resolve-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function resolveStyle(style, context) {
isPixelDimension.test(value)
? parseFloat(value.slice(0, -2))
: isPercentDimension.test(value)
? resolvePercentDimension(value, property, context)
: value
? resolvePercentDimension(value, property, context)
: value
);
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"devDependencies": {
"npm-run-all": "4.1.5",
"prettier": "3.0.3"
"prettier": "3.3.3"
},
"packageManager": "pnpm@8.6.5",
"version": "0.4.1"
"packageManager": "pnpm@9.5.0",
"version": "0.6.0"
}
Loading
Loading