-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
306 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# managed-by-autotool | ||
|
||
package-lock.json | ||
node_modules | ||
vite.config.ts.* | ||
vitest.config.ts.* | ||
shims | ||
typedoc | ||
|
||
# sveltekit | ||
.svelte-kit | ||
.vercel | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// managed-by-autotool | ||
|
||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
extends: ['../../../../.eslintrc.cjs', '@alexaegis/eslint-config-vitest'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# managed-by-autotool | ||
# Add files here to ignore them from prettier formatting | ||
|
||
# node | ||
node_modules | ||
package-lock.json | ||
pnpm-lock.yaml | ||
yarn.lock | ||
|
||
# build artifacts | ||
dist | ||
public/build | ||
build | ||
.svelte-kit | ||
.vercel | ||
typedoc | ||
**/.vitepress/cache | ||
|
||
# test artifacts | ||
coverage | ||
.vscode/chrome | ||
.nyc_output | ||
vite.config.ts.* | ||
vitest.config.ts.* | ||
|
||
# turbo | ||
.turbo | ||
|
||
# rust | ||
target | ||
*.lock | ||
|
||
# python | ||
.pytest_cache | ||
|
||
# others | ||
.cache | ||
.benchmark | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"name": "@alexaegis/advent-of-code-2023-25", | ||
"description": "Advent of Code 2023 25 solutions", | ||
"version": "1.0.0", | ||
"license": "mit", | ||
"private": true, | ||
"archetype": { | ||
"platform": "node", | ||
"framework": "adventofcode", | ||
"language": "ts" | ||
}, | ||
"keywords": [ | ||
"advent-of-code", | ||
"javascript", | ||
"js", | ||
"managed-by-autotool", | ||
"ts", | ||
"typescript" | ||
], | ||
"type": "module", | ||
"aoc": { | ||
"day": 25, | ||
"year": 2023 | ||
}, | ||
"scripts": { | ||
"lint:depcheck": "turbo run lint:depcheck_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/advent-of-code-2023-25", | ||
"lint:depcheck_": "depcheck", | ||
"lint:es": "turbo run lint:es_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/advent-of-code-2023-25", | ||
"lint:es_": "eslint --max-warnings=0 --fix --no-error-on-unmatched-pattern .", | ||
"lint:format": "turbo run lint:format_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/advent-of-code-2023-25", | ||
"lint:format_": "prettier --cache-location .cache/prettier --plugin prettier-plugin-svelte --plugin prettier-plugin-tailwindcss --check .", | ||
"lint:md": "turbo run lint:md_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/advent-of-code-2023-25", | ||
"lint:md_": "remark --frail --no-stdout --silently-ignore .", | ||
"lint:tsc": "turbo run lint:tsc_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/advent-of-code-2023-25", | ||
"lint:tsc_": "tsc --noEmit", | ||
"test": "turbo run test_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/advent-of-code-2023-25", | ||
"test_": "vitest --passWithNoTests --coverage --run", | ||
"test:watch": "vitest --passWithNoTests --coverage", | ||
"all": "BUILD_REASON='publish' turbo run all_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/advent-of-code-2023-25", | ||
"bench": "ts-node-esm src/bench.ts", | ||
"build": "turbo run build-lib_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/advent-of-code-2023-25", | ||
"build-lib_": "vite build", | ||
"format": "turbo run format_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/advent-of-code-2023-25", | ||
"format_": "prettier --cache-location .cache/prettier --plugin prettier-plugin-svelte --plugin prettier-plugin-tailwindcss --write .", | ||
"p1": "RUN=1 NODE_NO_WARNINGS=1 ts-node-esm src/p1.ts", | ||
"p2": "RUN=1 NODE_NO_WARNINGS=1 ts-node-esm src/p2.ts" | ||
}, | ||
"exports": { | ||
"./bench": { | ||
"types": "./src/bench.ts", | ||
"import": "./dist/bench.js", | ||
"default": "./dist/bench.js" | ||
}, | ||
"./p1": { | ||
"types": "./src/p1.ts", | ||
"import": "./dist/p1.js", | ||
"default": "./dist/p1.js" | ||
}, | ||
"./p2": { | ||
"types": "./src/p2.ts", | ||
"import": "./dist/p2.js", | ||
"default": "./dist/p2.js" | ||
}, | ||
"./readme": "./readme.md" | ||
}, | ||
"dependencies": { | ||
"@alexaegis/advent-of-code-lib": "workspace:^" | ||
}, | ||
"devDependencies": { | ||
"@alexaegis/eslint-config-vitest": "^0.9.2", | ||
"@alexaegis/ts": "^0.9.2", | ||
"@alexaegis/vite": "^0.9.2", | ||
"@alexaegis/vitest": "^0.9.2", | ||
"@types/node": "^20.10.5", | ||
"benny": "^3.7.1", | ||
"vite": "^5.0.10", | ||
"vitest": "^1.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# [Day 25](https://adventofcode.com/2023/day/25) | ||
|
||
## [Part One](https://adventofcode.com/2023/day/25#part1) | ||
|
||
> [TypeScript](/solutions/typescript/2023/25/src/p1.ts) | ||
## [Part Two](https://adventofcode.com/2023/day/25#part2) | ||
|
||
> [TypeScript](/solutions/typescript/2023/25/src/p2.ts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { loadTaskResources } from '@alexaegis/advent-of-code-lib'; | ||
import { defaultBench } from '@alexaegis/advent-of-code-lib/benchmark'; | ||
import { add } from 'benny'; | ||
import packageJson from '../package.json'; | ||
import { p1 } from './p1.js'; | ||
import { p2 } from './p2.js'; | ||
|
||
await defaultBench( | ||
'2023 - Day 25', | ||
add('Part One', async () => { | ||
const { input } = await loadTaskResources(packageJson.aoc); | ||
return () => p1(input); | ||
}), | ||
add('Part Two', async () => { | ||
const { input } = await loadTaskResources(packageJson.aoc); | ||
return () => p2(input); | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { loadTaskResources } from '@alexaegis/advent-of-code-lib'; | ||
import { describe, expect, it } from 'vitest'; | ||
import packageJson from '../package.json'; | ||
import { p1 } from './p1.js'; | ||
|
||
describe.skip('2023 25 p1', () => { | ||
describe('the input', () => { | ||
it('should solve the input', async () => { | ||
const resources = await loadTaskResources(packageJson.aoc); | ||
expect(p1(resources.input)).toEqual(0); | ||
}); | ||
}); | ||
|
||
describe('example 1', () => { | ||
it('should be solved', async () => { | ||
const resources = await loadTaskResources(packageJson.aoc, 'example.1.txt'); | ||
expect(p1(resources.input)).toEqual(0); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { task } from '@alexaegis/advent-of-code-lib'; | ||
import packageJson from '../package.json'; | ||
|
||
export const p1 = (_input: string): number => { | ||
return 0; | ||
}; | ||
|
||
await task(p1, packageJson.aoc); // 0 ~0ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { loadTaskResources } from '@alexaegis/advent-of-code-lib'; | ||
import { describe, expect, it } from 'vitest'; | ||
import packageJson from '../package.json'; | ||
import { p2 } from './p2.js'; | ||
|
||
describe.skip('2023 25 p2', () => { | ||
describe('the input', () => { | ||
it('should solve the input', async () => { | ||
const { input } = await loadTaskResources(packageJson.aoc); | ||
expect(p2(input)).toEqual(0); | ||
}); | ||
}); | ||
|
||
describe('example 1', () => { | ||
it('should be solved', async () => { | ||
const { input } = await loadTaskResources(packageJson.aoc, 'example.1.txt'); | ||
expect(p2(input)).toEqual(0); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { task } from '@alexaegis/advent-of-code-lib'; | ||
import packageJson from '../package.json'; | ||
|
||
export const p2 = (_input: string): number => { | ||
return 0; | ||
}; | ||
|
||
await task(p2, packageJson.aoc); // 0 ~0ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/tsconfig?mark=managed-by-autotool", | ||
"extends": "@alexaegis/ts/node", | ||
"compilerOptions": { | ||
"rootDir": "../../../../", | ||
"outDir": ".cache/tsc" | ||
}, | ||
"files": ["package.json", "../../../../package.json"], | ||
"include": [ | ||
"src/**/*", | ||
"static/**/*", | ||
"__mocks__/**/*", | ||
"*", | ||
".*", | ||
"*.json", | ||
".*.json", | ||
"**/*.json" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"dist", | ||
"coverage", | ||
"typedoc", | ||
".turbo", | ||
".cache", | ||
"vite*.config.ts.timestamp-*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "https://typedoc.org/schema.json?mark=managed-by-autotool", | ||
"extends": ["../../../../.config/typedoc.base.json"], | ||
"entryPoints": ["src/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// managed-by-autotool | ||
|
||
import { pakk } from '@alexaegis/vite'; | ||
import { defineConfig } from 'vite'; | ||
|
||
export default defineConfig({ | ||
build: { | ||
target: 'es2022', | ||
lib: { | ||
entry: [], | ||
formats: ['es'], | ||
}, | ||
}, | ||
plugins: [ | ||
pakk({ | ||
dts: false, | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// managed-by-autotool | ||
|
||
export { vitestNodeConfig as default } from '@alexaegis/vitest'; |