Skip to content

Commit

Permalink
Merge pull request #699 from tweenjs/trusktr-patch-1
Browse files Browse the repository at this point in the history
Update tests.yml to use the latest LTS version of Node.js
  • Loading branch information
trusktr authored Jan 11, 2025
2 parents 87e6a43 + 148d23c commit 6536e9d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: build and tests
name: build and test

on: [push]

jobs:
build:
build-and-test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [lts/*]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm clean-install
- run: npm test
19 changes: 17 additions & 2 deletions src/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import Easing from './Easing'
import Group from './Group'
import Interpolation from './Interpolation'
import now, { setNow } from './Now'
import now, {setNow} from './Now'
import Sequence from './Sequence'
import Tween from './Tween'
import VERSION from './Version'
Expand Down Expand Up @@ -273,7 +273,22 @@ const update = TWEEN.update.bind(TWEEN)

// NOTE! Make sure both lists of exports below are kept in sync:

export {Easing, Group, Interpolation, now, setNow, Sequence, nextId, Tween, VERSION, getAll, removeAll, add, remove, update}
export {
Easing,
Group,
Interpolation,
now,
setNow,
Sequence,
nextId,
Tween,
VERSION,
getAll,
removeAll,
add,
remove,
update,
}

const exports = {
Easing,
Expand Down
4 changes: 2 additions & 2 deletions src/Now.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
let _nowFunc: Function = () => performance.now()

const now = (): number => {
return _nowFunc()
return _nowFunc()
}

export function setNow(nowFunction: Function) {
_nowFunc = nowFunction
_nowFunc = nowFunction
}

export default now

0 comments on commit 6536e9d

Please sign in to comment.