Skip to content

Commit

Permalink
Merge pull request #3 from Flared/maxc/bump_to_3_54_1
Browse files Browse the repository at this point in the history
Bumped fork to 3.54.1
  • Loading branch information
Pourliver authored Nov 6, 2024
2 parents cca1a42 + 31cbb3b commit 1c1e042
Show file tree
Hide file tree
Showing 426 changed files with 54,091 additions and 28,880 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ labels: bug
### Reproduction Link

<!-- REQUIRED -->
<!--
<!--
Modify this codepen https://codepen.io/apexcharts/pen/bxzgZJ to demonstrate the problem clearly, just fork it and paste the resulting codepen in your issue. Please make sure this is a minimal example, containing only the minimum necessary code to help us troubleshoot your problem. Issues/bug reports without reproducible example WILL BE CLOSED, so make sure you include one.
If you are using vue-apexcharts, and want to create a demo in Vue environment, use the CodeSandbox Vue template - https://codesandbox.io/s/pwwz8009n0
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Feature Request
---
name: Feature Request
about: Suggest a feature you would like to have in ApexCharts
labels: feature-request
---
Expand Down
107 changes: 107 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# This workflow will do the following when a pull request is made against the main branch:
# 1. Clone base repository (apexcharts/apexcharts.js), install npm packages, build samples, and then generate e2e snapshots
# 2. Clone head repository (the repository with the code in the pull request), install npm packages, build samples, get snapshots generated from the base repository, run tests, and then generate an apexcharts build
# Test coverage results, base repository snapshots, head repository snapshots and diffs, sample HTML, and the apexcharts build are all uploaded to the workflow artifacts
# The diffs, build, and coverage results get uploaded even if the test fails for manual inspection and to make debugging easier

name: Node.js CI

on:
pull_request:
branches: [ main ]

jobs:
build:
name: Test & Build
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Create base repository artifacts folder
run: mkdir -p ${{ runner.temp }}/artifacts/base-repository
- name: Create head repository artifacts folder
run: mkdir -p ${{ runner.temp }}/artifacts/head-repository

- name: Checkout base repository
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.base.repo.full_name }}
ref: ${{ github.event.pull_request.base.ref }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install base repository's packages
run: npm ci
- name: Generate base repository's samples
run: npm run build:samples
- name: Copy Base Repository Samples To Artifacts Folder
run: cp -r samples/vanilla-js ${{ runner.temp }}/artifacts/base-repository/samples
- name: Generate base repository's e2e snapshots
run: npm run e2e:update
- name: Copy Base Repository e2e Snapshots To Artifacts Folder
run: cp -r tests/e2e/snapshots ${{ runner.temp }}/artifacts/base-repository/snapshots

- name: Checkout head repository
uses: actions/checkout@v4
- name: Install head repository's packages
run: npm ci
- name: Generate head repository's samples
run: npm run build:samples
- name: Copy Head Repository Samples To Artifacts Folder
run: cp -r samples/vanilla-js ${{ runner.temp }}/artifacts/head-repository/samples
- name: Delete snapshots folder
run: rm -r tests/e2e/snapshots
- name: Copy snapshots from base repository
run: cp -r ${{ runner.temp }}/artifacts/base-repository/snapshots tests/e2e
- name: Run tests
run: npm run test:ci
- name: Copy Head Repository Diffs To Artifacts Folder
if: '!cancelled()'
run: cp -r tests/e2e/diffs ${{ runner.temp }}/artifacts/head-repository/diffs
- name: Build apexcharts
if: '!cancelled()'
run: npm run build --if-present
- name: Copy Head Repository Build To Artifacts Folder
if: '!cancelled()'
run: cp -r dist ${{ runner.temp }}/artifacts/head-repository/build
- name: Copy Head Repository Test Coverage To Artifacts Folder
if: '!cancelled()'
run: cp -r coverage ${{ runner.temp }}/artifacts/head-repository/coverage
- name: Upload Artifacts
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: node${{ matrix.node-version }}${{ runner.os }}results
path: ${{ runner.temp }}/artifacts

test-reproducibility:
name: Test Reproducibility
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
run: npm ci
- name: Build samples
run: npm run build:samples
- name: Generate snapshots
run: npm run e2e:update
- name: Run tests
run: npm run test:ci

23 changes: 5 additions & 18 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '19 13 * * 6'
- cron: '19 13 * * *'

jobs:
analyze:
Expand All @@ -33,39 +33,26 @@ jobs:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- run: npm ci
- name: Lint
run: npm run lint
32 changes: 0 additions & 32 deletions .github/workflows/node.js.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v3
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
exempt-issue-labels: 'bug'
exempt-issue-labels: 'bug,high-priority'
operations-per-run: 100
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ tests/e2e/diffs
.nyc_output
.vscode
bundle-analysis.html
/nbproject/private/
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ npm run dev:cjs
In a new terminal window, create a new project outside of the Apexcharts folder.

```bash
mkdir ~/new-project && cd ~/new-project &&
mkdir ~/new-project && cd ~/new-project &&
npm init -y
```

Expand Down Expand Up @@ -110,7 +110,7 @@ npm run test
If this command ends with an error `Error: Unable to launch browser, error message: Chromium revision is not downloaded.` then calling puppeteer install may solve the problem:

```bash
node node_modules/puppeteer/install.js
node node_modules/puppeteer/install.mjs
```

E2e tests will likely fail due to minor differences in OS and the browser version used to take screenshots. To address this, before working on a feature, recapture screenshots using this command:
Expand Down
1 change: 1 addition & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Please delete options that are not relevant.
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] My branch is up to date with any changes from the main branch
16 changes: 0 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@

<br />

## Browsers support

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> Edge | [<img src="https://user-images.githubusercontent.com/17712401/124668393-30772d00-de87-11eb-9360-3199c3b68b95.png" alt="IE" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> IE11 |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 31+ ✔ | 35+ ✔ | 6+ ✔ | Edge ✔ | [(IE11)](#using-it-with-ie11) ✔ |

## Download and Installation

##### Installing via npm
Expand Down Expand Up @@ -180,16 +174,6 @@ apexcharts/
└── samples/
```

## Using it with IE11

If you need to make it work with IE11, you need to include these polyfills before including ApexCharts

- [promise-polyfill](https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js)
- [classlist.js](https://cdn.jsdelivr.net/npm/eligrey-classlist-js-polyfill)
- [ResizeObserver polyfill](https://cdn.jsdelivr.net/npm/@juggle/resize-observer)
- [findIndex](https://cdn.jsdelivr.net/npm/findindex_polyfill_mdn) - You will need this only if you require timeline/rangebar charts
- [canvg](https://unpkg.com/[email protected]/lib/umd.js) - You will need this only if you require PNG download of your charts

## Development

#### Install dependencies and run the project
Expand Down
5 changes: 1 addition & 4 deletions build/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const json = require('@rollup/plugin-json')
const resolve = require('@rollup/plugin-node-resolve')
const svgo = require('rollup-plugin-svgo')
const strip = require('@rollup/plugin-strip')
const { terser } = require('rollup-plugin-terser')
const terser = require('@rollup/plugin-terser').default

const version = require('../package.json').version

Expand Down Expand Up @@ -98,9 +98,6 @@ function rollupConfig(opts) {
terser({
output: {
ascii_only: true
},
compress: {
pure_funcs: ['makeMap']
}
})
)
Expand Down
2 changes: 1 addition & 1 deletion dist/apexcharts.amd.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/apexcharts.common.js

Large diffs are not rendered by default.

Loading

0 comments on commit 1c1e042

Please sign in to comment.