caderek / aocrunner Goto Github PK
View Code? Open in Web Editor NEWAdvent of Code runner
License: ISC License
Advent of Code runner
License: ISC License
INPUT FOR AOC 2022 DAY 7 ALREADY FETCHED
Transpiling...
Need to install the following packages:
esbuild
Ok to proceed? (y) y
dist/day02/index.js 2.6kb
dist/day05/index.js 2.2kb
dist/day03/index.js 1.6kb
dist/day04/index.js 1.3kb
dist/day01/index.js 873b
dist/day06/index.js 834b
dist/day07/index.js 699b
dist/template/index.js 423b
dist/utils/index.js 34b
dist/day02/index.js.map 5.3kb
dist/day05/index.js.map 4.9kb
Transpiling...
Need to install the following packages:
esbuild
Ok to proceed? (y) y
dist/day07/index.js 699b
dist/day07/index.js.map 1.5kb
โก Done in 1ms
-- Day 7 ------------------------------
Hi,
let me say thank you for this package first. I'm really enjoying it.
I found one issue with test input when using template literals. It looks like it adds some wierd whitespace or uses something als instead of \n when using multiline strings.
Had this issue on day03 part1.
part1: {
tests: [
{
// works:
input: `00100\n11110\n10110\n10111\n10101\n01111\n00111\n11100\n10000\n11001\n00010\n01010`,
// does not work: (multiline string)
input: `00100
11110
10110
10111
10101
01111
00111
11100
10000
11001
00010
01010`,
expected: 198,
},
],
solution: part1,
},
Per this thread on reddit from the creator of AoC, API requests may be completely blocked soon if they do not include an appropriate User-Agent header.
If you have any kind of tool, website, script, plugin, etc etc that sends requests to AoC, please include your contact information (like your email address) in the
User-Agent
header of every request. (That's the contact info of the person that maintains the code sending the automated requests, not the contact info of the person using your code.) I'm seeing a lot of abusive traffic from tools that just identify themselves as stuff likepython-requests/x.y.z
, so I'll probably be blocking User Agents like those entirely soon. Even better would be to also include a URL where I can see the tool, too; a good User Agent would be something likegithub.com/topaz/name-of-tool by [email protected]
.
Would you be open for an optional VS Code setting available during setup ?
Scenario :
User runs npx aocrunner init
and is presented with the setup wizard.
After the user has selected their language, package manager, folder, name etc... an optional question is asked:
Would you like to enable VS Code integration/launch.json settings ? (y/N). (Or something similar)
If the user specifies "Y", a new .vscode/launch.json file will be added.
This will allow the user to press (F5/Ctrl+F5) or select Run and have VS Code prompt them for the number of the day they want to run.
(Example picture below)
Let me know if you'd be open to something like this and I can open a PR.
When I waork on my solution I usually want the code to be run on tests only and not on the real data. Can this be switched off? If I have several tests and some console.log debugging messages in my code, the run on real data usually sends lots of these messages and make debugging not so easy.
PS: Thanks for a great tool.
Hi, would you be open to adding jest as a test runner and being able to make a .test.js
file and have multiple test suites. I find that the single test runner in indes.js
works but I would like to have multiple test assertions for multiple unit/functions. In the current scenario I have to run each function that i want to test within the single run function. Thoughts?
Could we prevent send solution
when onlyTests
?
And/or send the solution with real input ?
Hey,
I absolutely don't want to take up much of your time with this issue so please if it's totally out of scope just close it.
I've been using this runner and I really like it but with the strict ESM settings, I'm not really sure which package.json or tsconfig.json things I'd need to set to get tests working (initial attempts fell over relating to ESM).
If you happened to know how to set this up, or felt like it would be a useful addition to the runner as the exercises get trickier and testing smaller parts might be useful, that would be super awesome.
Cheers for the great project either way!
Same as issue #17 - Can't seems to make it work.
I tried updating the version to 1.9.2
but it didn't work. Tried with node v16.18.1 and node v19.2.0
Working on macOS Monterey, Intel i5 processor.
Can you please have a look? thanks! ๐๐ผ
Despite the input.txt showing in the folder, it is saying there it is not there. On MacOS Ventura - Visual Studio Code running aocrunner 1.9.1
i input my first answer on the aoc website, then found aocrunner
and used it for my second answer.
the problem is, i can't send the answer in the cli
Type fetch or f - to fetch the input
Type send or s - to send the solutions
โ โฆ s
Part 1:
Status: ALREADY COMPLETED or LOCKED
am i out of luck for day 1?
with node 16.5.0
running npx aocrunner init
has this error
file:///Users/bschulze/.npm/_npx/b3b346747336e290/node_modules/aocrunner/lib/io/copy.js:3
fs.cpSync(fromDir, toDir, { recursive: true });
^
TypeError: fs.cpSync is not a function
at copy (file:///Users/bschulze/.npm/_npx/b3b346747336e290/node_modules/aocrunner/lib/io/copy.js:3:6)
at init (file:///Users/bschulze/.npm/_npx/b3b346747336e290/node_modules/aocrunner/lib/actions/init.js:43:3)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
when running with node 17.2.0
successfully created
Hello ๐ I just discovered this, so can't push the last 6 solutions - is there a way to pull in the stats so far, i.e. stars completed, time finished for each part, etc to the README?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.