ci: modernize workflows (node 24, pnpm 11), single workspace lockfile

The per-directory v5.3 lockfiles were stale against the 2.0.0 package.jsons and
unreadable by the workflows' pnpm 5 anyway; the root v9 workspace lockfile is
authoritative. Reformat sources for prettier-plugin-organize-imports v3 and
ignore build artifacts.
This commit is contained in:
coyotte508 2026-08-17 09:55:09 +00:00
commit 0566dcaab3
18 changed files with 46 additions and 14713 deletions

View file

@ -28,7 +28,7 @@ jobs:
node-version: ${{ env.node_version }}
# registry-url is required so npm publish targets the public npm registry
registry-url: 'https://registry.npmjs.org'
- run: npm install -g pnpm@5.17.1
- run: npm install -g pnpm@11
- run: pnpm install
- run: git config --global user.name github-actions
- run: git config --global user.email bot@github.com

View file

@ -17,13 +17,13 @@ jobs:
lint_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '12'
- uses: pnpm/action-setup@v1.2.1
node-version: '24'
- uses: pnpm/action-setup@v4
with:
version: 5.17.1
version: 11
- run: pnpm install
- run: pnpm build
- run: pnpm lint

View file

@ -5,10 +5,12 @@ jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: pnpm/action-setup@v1.2.1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
version: 5.17.1
node-version: '24'
- uses: pnpm/action-setup@v4
with:
version: 11
- run: pnpm install
- run: pnpm run prettier-check

View file

@ -28,7 +28,7 @@ jobs:
node-version: ${{ env.node_version }}
# registry-url is required so npm publish targets the public npm registry
registry-url: 'https://registry.npmjs.org'
- run: npm install -g pnpm@5.17.1
- run: npm install -g pnpm@11
- run: pnpm install
- run: git config --global user.name github-actions
- run: git config --global user.email bot@github.com

View file

@ -19,13 +19,13 @@ jobs:
test_and_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- uses: pnpm/action-setup@v1.2.1
node-version: '24'
- uses: pnpm/action-setup@v4
with:
version: 5.17.1
version: 11
- run: pnpm install
# - run: pnpm lint
# - run: pnpm test

2
.prettierignore Normal file
View file

@ -0,0 +1,2 @@
dist/
.vscode/

2361
engine/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

12309
viewer/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -136,7 +136,7 @@ export default class DropZone extends Vue {
if (!this.availableMoves[MoveName.DomesticSale]?.find((c) => c.id === container.pieceId)) {
return false;
}
} else if (this.data.type != DropZoneType.FactoryStore) {
} else if (this.data.type != DropZoneType.FactoryStore) {
return false;
}
} else {
@ -148,7 +148,7 @@ export default class DropZone extends Vue {
if (!this.availableMoves[MoveName.DomesticSale]?.find((c) => c.id === container.pieceId)) {
return false;
}
} else if (this.data.type != DropZoneType.WarehouseStore) {
} else if (this.data.type != DropZoneType.WarehouseStore) {
return false;
}
} else {

View file

@ -196,7 +196,7 @@ import DropZone from './DropZone.vue';
@Component({
components: {
DropZone,
}
},
})
export default class PlayerBoard extends Vue {
@Prop()
@ -233,7 +233,7 @@ export default class PlayerBoard extends Vue {
name += ' (Bid: $' + this.player.bid + ')';
}
} else if (this.ended) {
name += ' (Score: $' + (this.player.money) + ')';
name += ' (Score: $' + this.player.money + ')';
}
return name;

View file

@ -55,7 +55,7 @@
</template>
<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator';
import type { PointCard as PointCardInfo } from 'container-engine'
import type { PointCard as PointCardInfo } from 'container-engine';
@Component
export default class PointCard extends Vue {

View file

@ -10,6 +10,5 @@
import { Vue, Component } from 'vue-property-decorator';
@Component
export default class LogButton extends Vue {
}
export default class LogButton extends Vue {}
</script>

View file

@ -17,7 +17,7 @@ import Piece from './Piece.vue';
@Component({
created(this: Container) {
this.pieceType = PieceType.Container;
}
},
})
export default class Container extends Mixins(Piece) {
@Prop()

View file

@ -7,8 +7,8 @@ import { Vue, Component, Prop } from 'vue-property-decorator';
const endDrag = () => this.endDrag();
const drag = (event: MouseEvent | TouchEvent) => this.drag(event);
this.htmlElement.addEventListener('mousedown', event => this.startDrag(event));
this.htmlElement.addEventListener('touchstart', event => this.startDrag(event));
this.htmlElement.addEventListener('mousedown', (event) => this.startDrag(event));
this.htmlElement.addEventListener('touchstart', (event) => this.startDrag(event));
this.svgElement.addEventListener('touchmove', drag);
this.svgElement.addEventListener('touchend', endDrag);
@ -28,7 +28,7 @@ import { Vue, Component, Prop } from 'vue-property-decorator';
this.$on('hook:beforeDestroy', () => this.svgElement.removeEventListener('mouseup', endDrag));
this.$on('hook:beforeDestroy', () => this.svgElement.removeEventListener('mousemove', drag));
});
}
},
})
export default class Draggable extends Vue {
@Prop()
@ -48,8 +48,7 @@ export default class Draggable extends Vue {
}
startDrag(evt: MouseEvent | TouchEvent) {
if (!this.canDrag)
return;
if (!this.canDrag) return;
this.dragging = true;
@ -87,7 +86,9 @@ export default class Draggable extends Vue {
endDrag() {
this.dragging = false;
if (Date.now() - this._dragStart! < 100) {
this.$nextTick(() => { this.$emit('fastClick', this); });
this.$nextTick(() => {
this.$emit('fastClick', this);
});
}
}
@ -99,7 +100,7 @@ export default class Draggable extends Vue {
const CTM = this.svgElement.getScreenCTM()!;
return {
x: ((evt as any).clientX - CTM.e) / CTM.a,
y: ((evt as any).clientY - CTM.f) / CTM.d
y: ((evt as any).clientY - CTM.f) / CTM.d,
};
}
}

View file

@ -13,7 +13,7 @@ import Piece from './Piece.vue';
@Component({
created(this: Factory) {
this.pieceType = PieceType.Factory;
}
},
})
export default class Factory extends Mixins(Piece) {
@Prop()

View file

@ -16,7 +16,7 @@ import Piece from './Piece.vue';
@Component({
created(this: LoanCard) {
this.pieceType = PieceType.Loan;
}
},
})
export default class LoanCard extends Mixins(Piece) {
@Prop()

View file

@ -6,7 +6,7 @@ import { PieceType, UIData } from '@/types/ui-data';
@Component({
created(this: Piece) {
this.$on('draggedTo', (coords: { x: number, y: number }) => {
this.$on('draggedTo', (coords: { x: number; y: number }) => {
[this.currentX, this.currentY] = [coords.x, coords.y];
this.$nextTick(() => {
@ -19,14 +19,14 @@ import { PieceType, UIData } from '@/types/ui-data';
},
beforeDestroy(this: Piece) {
this.onTransitionEnd();
}
},
})
export default class Piece extends Draggable {
@Prop({ default: () => ({ x: 20, y: 20, rotate: 0 }) })
targetState!: {
x: number,
y: number,
rotate: number
x: number;
y: number;
rotate: number;
};
@Prop()
@ -84,7 +84,7 @@ export default class Piece extends Draggable {
this.startTransitioning();
} else {
this.moving = true;
setTimeout(() => this.moving = false, 800);
setTimeout(() => (this.moving = false), 800);
}
}
@ -121,7 +121,7 @@ export default class Piece extends Draggable {
}
get elId() {
return this.dragging ? 'dragged' : (this.transitioning || this.moving ? 'moving' : undefined);
return this.dragging ? 'dragged' : this.transitioning || this.moving ? 'moving' : undefined;
}
}
</script>

View file

@ -12,8 +12,7 @@ import Piece from './Piece.vue';
@Component({
created(this: Warehouse) {
this.pieceType = PieceType.Warehouse;
}
},
})
export default class Warehouse extends Mixins(Piece) {
}
export default class Warehouse extends Mixins(Piece) {}
</script>