diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d306ca2..670e2d3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,7 +3,7 @@ name: CI on: pull_request: push: - branches: [ "master" ] + branches: ["master"] jobs: build: @@ -11,25 +11,24 @@ jobs: 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 - diff --git a/dist/screeps-tests.ts b/dist/screeps-tests.ts index 6d28386..3060746 100644 --- a/dist/screeps-tests.ts +++ b/dist/screeps-tests.ts @@ -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 { diff --git a/package.json b/package.json index 2dae13e..7972b40 100644 --- a/package.json +++ b/package.json @@ -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}": [