Skip to content

Commit

Permalink
Merge pull request #17796 from apache/master
Browse files Browse the repository at this point in the history
Merge branch 'master' into 'next'
  • Loading branch information
pissang authored Oct 20, 2022
2 parents 0c82ead + 5d6910f commit 7a12c0b
Show file tree
Hide file tree
Showing 59 changed files with 653 additions and 237 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

steps:
- name: Fetch commit count
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/nightly-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,27 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: next

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
- name: Setup and publish nightly
run: |
node build/nightly/prepare.js --next
npm i zrender@npm:zrender-nightly@next
npm ci
npm ls zrender
node build/nightly/post.js
npm run release
npm run test
npm run test:dts
node build/prepareNightly.js --next
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
11 changes: 7 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,24 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
- name: Setup and publish nightly
run: |
node build/nightly/prepare.js
npm i zrender@npm:zrender-nightly
npm ci
npm ls zrender
node build/nightly/post.js
npm run release
npm run test
npm run test:dts
node build/prepareNightly.js
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
28 changes: 14 additions & 14 deletions .github/workflows/source-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -26,15 +26,15 @@ jobs:
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: Prepare releaes materials
- name: Prepare release materials
run: |
npm i
node build/source-release/prepareReleaseMaterials.js \
Expand All @@ -44,7 +44,7 @@ jobs:
--out tmp/materials
- name: Archive materials
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: apache-echarts-${{env.RELEASE_VERSION}}-release-materials
path: |
Expand All @@ -56,13 +56,13 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -72,15 +72,15 @@ jobs:
# Get RELEASE_NOTE.txt and pack it into zip.
- name: Download materials
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: apache-echarts-${{env.RELEASE_VERSION}}-release-materials

# TODO Check release version is RC

# Archive before run others to avoid packing unknown files.
- name: Archive source release
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: apache-echarts-${{env.RELEASE_VERSION}}-src
path: |
Expand Down Expand Up @@ -109,11 +109,11 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -122,7 +122,7 @@ jobs:
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Download source release
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: apache-echarts-${{env.RELEASE_VERSION}}-src
path: tmp/echarts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: ${{ github.repository_owner == 'apache' }}
steps:
- name: Close Stale Issues
uses: actions/stale@v5
uses: actions/stale@v6
with:
days-before-stale: 730
days-before-close: 7
Expand Down
30 changes: 30 additions & 0 deletions build/nightly/post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

const fs = require('fs');

const root = __dirname + '/../../';
const echartsPkg = JSON.parse(fs.readFileSync(root + 'package.json'), 'utf-8');
const zrenderPkg = JSON.parse(fs.readFileSync(root + 'node_modules/zrender/package.json', 'utf-8'));

const echartsCorePath = root + 'src/core/echarts.ts';
const echartsCoreFile = fs.readFileSync(echartsCorePath, 'utf-8')
.replace(/export const version = '\S+'/, `export const version = '${echartsPkg.version}'`)
.replace(/(export const dependencies = {\s+zrender: ')\S+('\s+})/, `$1${zrenderPkg.version}$2`);
fs.writeFileSync(echartsCorePath, echartsCoreFile, 'utf-8');
7 changes: 3 additions & 4 deletions build/prepareNightly.js → build/nightly/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


const fs = require('fs');
const packageJsonPath = __dirname + '/../package.json';
const packageJsonPath = __dirname + '/../../package.json';
const nightlyPackageName = 'echarts-nightly';

const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
Expand Down Expand Up @@ -57,8 +57,7 @@ packageJson.version = updateVersion(packageJson.version);

fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8');


const readmePath = __dirname + '/../README.md';
const readmePath = __dirname + '/../../README.md';
const readmeAttention = `<h3>
<p><em>⚠️ ATTENTION PLEASE</em></p>
<p><em>This is nightly build of Apache ECharts. Please DON't use it in your production environment.</em></p>
Expand All @@ -70,4 +69,4 @@ ${readmeAttention}
${readmeContent}
`, 'utf-8');
}
}
6 changes: 3 additions & 3 deletions src/animation/customGraphicTransition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,12 @@ function duringCall(
return;
}
// If el is remove from zr by reason like legend, during still need to called,
// becuase el will be added back to zr and the prop value should not be incorrect.
// because el will be added back to zr and the prop value should not be incorrect.

const latestUserDuring = transitionInnerStore(el).userDuring;
const scopeUserDuring = scope.userDuring;
// Ensured a during is only called once in each animation frame.
// If a during is called multiple times in one frame, maybe some users' calulation logic
// If a during is called multiple times in one frame, maybe some users' calculation logic
// might be wrong (not sure whether this usage exists).
// The case of a during might be called twice can be: by default there is a animator for
// 'x', 'y' when init. Before the init animation finished, call `setOption` to start
Expand Down Expand Up @@ -629,4 +629,4 @@ if (__DEV__) {
+ 'Only `' + keys(TRANSFORM_PROPS_MAP).join('`, `') + '` are permitted.');
}
};
}
}
Loading

0 comments on commit 7a12c0b

Please sign in to comment.