Skip to content

Commit 6536e9d

Browse files
authored
Merge pull request #699 from tweenjs/trusktr-patch-1
Update tests.yml to use the latest LTS version of Node.js
2 parents 87e6a43 + 148d23c commit 6536e9d

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: build and tests
4+
name: build and test
55

66
on: [push]
77

88
jobs:
9-
build:
9+
build-and-test:
1010
runs-on: ubuntu-latest
1111

1212
strategy:
1313
matrix:
14-
node-version: [16.x, 18.x, 20.x]
14+
node-version: [lts/*]
1515

1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v1
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version: ${{ matrix.node-version }}
22-
- run: npm install
22+
- run: npm clean-install
2323
- run: npm test

src/Index.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import Easing from './Easing'
1111
import Group from './Group'
1212
import Interpolation from './Interpolation'
13-
import now, { setNow } from './Now'
13+
import now, {setNow} from './Now'
1414
import Sequence from './Sequence'
1515
import Tween from './Tween'
1616
import VERSION from './Version'
@@ -273,7 +273,22 @@ const update = TWEEN.update.bind(TWEEN)
273273

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

276-
export {Easing, Group, Interpolation, now, setNow, Sequence, nextId, Tween, VERSION, getAll, removeAll, add, remove, update}
276+
export {
277+
Easing,
278+
Group,
279+
Interpolation,
280+
now,
281+
setNow,
282+
Sequence,
283+
nextId,
284+
Tween,
285+
VERSION,
286+
getAll,
287+
removeAll,
288+
add,
289+
remove,
290+
update,
291+
}
277292

278293
const exports = {
279294
Easing,

src/Now.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
let _nowFunc: Function = () => performance.now()
22

33
const now = (): number => {
4-
return _nowFunc()
4+
return _nowFunc()
55
}
66

77
export function setNow(nowFunction: Function) {
8-
_nowFunc = nowFunction
8+
_nowFunc = nowFunction
99
}
1010

1111
export default now

0 commit comments

Comments
 (0)