Skip to content

Commit

Permalink
chore: upgrade ts to 5.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondMofeng committed Jul 19, 2024
1 parent 93afc7b commit b044cad
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,32 @@ name: CI
on:
pull_request:
push:
branches: [ "master" ]
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [18.x, 20.x, 22.x]

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

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

- name: Install dependencies
run: npm ci
- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint:test
- name: Lint
run: npm run lint:test

# this has been covered in the prepare script

# - name: Dtslint test
# run: npm run test

2 changes: 1 addition & 1 deletion dist/screeps-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function resources(o: GenericStore): ResourceConstant[] {
const parsed = /^[WE]([0-9]+)[NS]([0-9]+)$/.exec(roomName);
if (parsed !== null) {
const isHighway = parseInt(parsed[1], 10) % 10 === 0 || parseInt(parsed[2], 10) % 10 === 0;
const isMyRoom = Game.rooms[roomName] && Game.rooms[roomName].controller && Game.rooms[roomName].controller!.my;
const isMyRoom = Game.rooms[roomName] && Game.rooms[roomName].controller && Game.rooms[roomName].controller?.my;
if (isHighway || isMyRoom) {
return 1;
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.3.0",
"typescript": "^4.6.3"
"typescript": "^5.5.0"
},
"lint-staged": {
"*.{ts,tsx}": [
Expand Down

0 comments on commit b044cad

Please sign in to comment.