Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .changeset/gold-buckets-taste.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
'@datastructures/avl-tree': patch
'@datastructures/graph': patch
'@datastructures/linked-list': patch
'@datastructures/queue': patch
'@datastructures/stack': patch
"@datastructures/avl-tree": patch
"@datastructures/graph": patch
"@datastructures/linked-list": patch
"@datastructures/queue": patch
"@datastructures/stack": patch
---

Updates repo config + all pkgs config
29 changes: 4 additions & 25 deletions .codependencerc
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
{
"codependencies": [
"@changesets/cli",
"@commitlint/cli",
"@commitlint/config-lerna-scopes",
"@commitlint/prompt",
"@types/node",
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser",
"@vitest/coverage-c8",
"c8",
"changesets",
"codependence",
"commitizen",
"conventional-changelog-cli",
"cross-env",
"eslint",
"eslint-config-prettier",
"husky",
"lint-staged",
"path-exists-cli",
"prettier",
"rimraf",
"tslib",
"tsutils",
"oxlint",
"oxfmt",
"oxlint-plugin-legibility",
"turbo",
"typescript",
"vitest"
"typescript"
]
}
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Turbo Remote Caching (optional, speeds up CI/CD)
# Get your token from: https://vercel.com/account/tokens
TURBO_TOKEN=your_turbo_token_here
TURBO_TEAM=your_team_slug_here

GITHUB_TOKEN=
PR_CREATE_TOKEN=
20 changes: 10 additions & 10 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ A short explanation of your problem or use-case is helpful!

**Steps to Reproduce:**

1.
2.
1.
2.
3. ...

**Expected Result**
Expand Down
38 changes: 19 additions & 19 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 0
ignore:
- dependency-name: eslint
versions:
- 7.18.0
- 7.19.0
- 7.20.0
- 7.21.0
- 7.22.0
- 7.23.0
- 7.24.0
- dependency-name: "@commitlint/config-lerna-scopes"
versions:
- 12.0.0
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 0
ignore:
- dependency-name: eslint
versions:
- 7.18.0
- 7.19.0
- 7.20.0
- 7.21.0
- 7.22.0
- 7.23.0
- 7.24.0
- dependency-name: "@commitlint/config-lerna-scopes"
versions:
- 12.0.0
108 changes: 108 additions & 0 deletions .github/workflows/biweekly-challenge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Biweekly Data Structure Challenge

on:
schedule:
# Every other Monday at 9:00 AM UTC (1:00 AM PST) - runs on the 1st and 15th day of month
- cron: "0 9 1,15 * *"
workflow_dispatch: # Allow manual trigger

jobs:
generate-challenge:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Generate new data structure challenge
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: bun run scripts/generateNewDataStructure.ts

- name: Get challenge info
id: challenge-info
run: bun scripts/challenge-info.ts

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: |
feat(${{ steps.challenge-info.outputs.name }}): add ${{ steps.challenge-info.outputs.title }} challenge

- Difficulty: ${{ steps.challenge-info.outputs.difficulty }}
- Challenge details provided
- Ready for implementation

Generated with Claude AI
branch: challenge/${{ steps.challenge-info.outputs.name }}
delete-branch: true
title: "Biweekly Challenge: ${{ steps.challenge-info.outputs.title }}"
body: |
## New Biweekly Data Structure Challenge

**Data Structure:** ${{ steps.challenge-info.outputs.title }}
**Difficulty:** ${{ steps.challenge-info.outputs.difficulty }}
**Challenge Details:** `challenge-${{ steps.challenge-info.outputs.name }}.json`

### What's Included

- Challenge specification with operations and complexity analysis
- TypeScript interface and factory function templates
- Hints and use cases
- Added to challenges.json tracker

### Getting Started

```bash
# 1. Create the package and demo app
bun run create ${{ steps.challenge-info.outputs.name }}

# 2. Review the challenge details
cat challenge-${{ steps.challenge-info.outputs.name }}.json

# 3. Implement the data structure
cd structures/${{ steps.challenge-info.outputs.name }}
# Edit src/index.ts with the implementation

# 4. Create the visualization
cd ../../apps/${{ steps.challenge-info.outputs.name }}-demo
bun run dev
# Edit src/main.ts to visualize the data structure

# 5. Run tests
cd ../..
bun test
```

### Implementation Checklist

- [ ] Create package with `bun run create ${{ steps.challenge-info.outputs.name }}`
- [ ] Implement data structure in `structures/${{ steps.challenge-info.outputs.name }}/src/index.ts`
- [ ] Write tests in `structures/${{ steps.challenge-info.outputs.name }}/tests/`
- [ ] Create interactive demo in `apps/${{ steps.challenge-info.outputs.name }}-demo/`
- [ ] Add visualization with Tailwind CSS
- [ ] All tests passing
- [ ] Update challenges.json `completed: true`
- [ ] Ready for code review

---

*This challenge was generated by Claude AI using the biweekly automation.*

Have fun building!
labels: |
data-structure
biweekly-challenge
auto-generated
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'
name: "CodeQL"

on:
push:
branches: ['main']
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
branches: ["main"]
schedule:
- cron: '33 10 * * 1'
- cron: "33 10 * * 1"

jobs:
analyze:
Expand All @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: ['javascript']
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

Expand Down
23 changes: 5 additions & 18 deletions .github/workflows/pull-request-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,18 @@ name: Datastructures 🦄

on:
push:
branches: [master]
branches: [main, master]
pull_request:
branches: [master]
branches: [main, master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile=false
- run: pnpm build
- run: pnpm lint
- run: pnpm test
- uses: jdx/mise-action@v2
- run: bun install --frozen-lockfile
- run: bun run check
env:
CI: true
29 changes: 7 additions & 22 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,27 @@ name: update deps

on:
schedule:
- cron: '0 5 * * 1'
- cron: "0 5 * * 1"
# - cron: "*/5 * * * *"

jobs:
udpate-deps:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: latest
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install --no-frozen-lockfile
- run: pnpm build
- run: pnpm test
- run: pnpm run update
- run: pnpm install --recursive --no-frozen-lockfile
- uses: jdx/mise-action@v2
- run: bun install --frozen-lockfile
- run: bun update
- run: bun run check
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PR_CREATE_TOKEN }}
commit-message: Update dependencies
title: '[Codependence] update dependencies'
title: "build(deps): update Bun dependencies"
body: |
## Dependency updates
Auto-generated by [codependence][1] using [create-pull-request][2]
[1]: https://github.com/yowainwright/datastructures
[2]: https://github.com/peter-evans/create-pull-request
Updated with `bun update` and verified with `bun run check`.
branch: update-dependencies
labels: codependencies
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,16 @@ coverage

**/dist/*
.turbo
.vscode

# Generated challenge detail files (committed in PRs)
challenge-*.json

# Python
__pycache__/
*.py[cod]
*$py.class
.pytest_cache/
.venv/
venv/
*.egg-info/
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/post-merge

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

Loading
Loading