From bee6dee09d14672177ecb3d77e3c12f547543266 Mon Sep 17 00:00:00 2001 From: Samantha Nguyen Date: Thu, 1 Jan 2026 18:49:03 -0600 Subject: [PATCH] chore: migrate repo to Tangled --- .gitattributes | 8 -- .github/dependabot.yml | 47 ------------ .github/workflows/codeql.yml | 62 --------------- .github/workflows/docs.yml | 58 -------------- .github/workflows/main.yml | 118 ----------------------------- .tangled/workflows/build.yml | 19 +++++ .tangled/workflows/codeqa-fmt.yml | 17 +++++ .tangled/workflows/codeqa-lint.yml | 17 +++++ LICENSE | 2 +- README.md | 14 +--- packages/pkg1/README.md | 6 -- packages/pkg1/package.json | 6 +- 12 files changed, 61 insertions(+), 313 deletions(-) delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .tangled/workflows/build.yml create mode 100644 .tangled/workflows/codeqa-fmt.yml create mode 100644 .tangled/workflows/codeqa-lint.yml diff --git a/.gitattributes b/.gitattributes index 96f2c44..dfe0770 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,2 @@ # Auto detect text files and perform LF normalization * text=auto - -# Linguist overrides -# - Recognize TSConfig file variants as JSONC (e.g: tsconfig.base.json) -# - Recognize oxfmt + oxlint config files as JSONC -Dockerfile -linguist-detectable -tsconfig.*.json linguist-language=JSON-with-Comments -.oxfmtrc.json linguist-language=JSON-with-Comments -.oxlintrc.json linguist-language=JSON-with-Comments diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a1945a5..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,47 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: 'npm' - directory: '/' - schedule: - interval: 'monthly' - commit-message: - prefix: 'deps(npm):' - groups: - typescript: - patterns: - - 'node-modules-inspector' - - 'typescript' - - 'typedoc' - - '@types/*' - voidzero: - patterns: - - 'oxfmt' - - 'oxlint' - - 'oxlint-tsgolint' - - 'rolldown' - - 'rolldown-vite' - - 'rolldown-plugin-*' - - 'tsdown' - - 'vite' - - 'vite-plugin-*' - - 'vitest' - - '@vitest/*' - open-pull-requests-limit: 4 - - - package-ecosystem: 'github-actions' - directory: '/' - schedule: - interval: 'daily' - commit-message: - prefix: 'deps(gha):' - groups: - github: - patterns: - - 'github/*' - - 'actions/*' - open-pull-requests-limit: 4 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index f02e210..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: CodeQL - -on: - schedule: - # Run once a week on Monday at 00:00 (12:00AM or Midnight, UTC) - # - See visualization: https://crontab.guru/#0_0_*_*_1 - # - GitHub Docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule - - cron: '0 0 * * 1' - -jobs: - analyze: - name: Analyze - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: ['javascript'] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Use only 'java' to analyze code written in Java, Kotlin or both - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v4 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 - with: - category: '/language:${{matrix.language}}' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 9254fe0..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Documentation - -on: - push: - branches: - - main - pull_request: - branches: - - main - workflow_dispatch: - -concurrency: - group: 'pages' - cancel-in-progress: false - -jobs: - build: - permissions: - contents: read - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - name: Install Node.js - uses: actions/setup-node@v6 - with: - node-version: latest - cache: 'pnpm' - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Setup Pages - id: pages - uses: actions/configure-pages@v5 - - name: Build documentation - run: npm run docs - - name: Upload artifact - uses: actions/upload-pages-artifact@v4 - with: - path: ./dist/typedoc - - deploy: - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - if: github.event_name != 'pull_request' - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 7f4db44..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Node.js CI - -on: - push: - branches: - - main - pull_request: - branches: - - main - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - build: - name: build (Node @${{ matrix.label }}) - runs-on: ubuntu-latest - strategy: - matrix: - include: - - node-version: lts/* - label: LTS - - node-version: latest - label: Latest - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - name: Install Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v6 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Build packages - run: pnpm run build - - codequality: - name: codequality (${{ matrix.tool }}) - runs-on: ubuntu-latest - strategy: - matrix: - include: - - tool: oxfmt - tool-purpose: formatter - script: fmt-ci - - tool: oxlint - tool-purpose: linter - script: lint - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - name: Install Node.js - uses: actions/setup-node@v6 - with: - node-version: latest - cache: 'pnpm' - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Print environment info - run: pnpx ${{ matrix.tool }} --version - - name: Run ${{ matrix.tool-purpose }} checks - run: pnpm run ${{ matrix.script }} - - test: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - name: Install Node.js - uses: actions/setup-node@v6 - with: - node-version: latest - cache: 'pnpm' - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Run tests - run: pnpm run test-ci - - name: Upload code coverage - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - directory: dist/vitest/coverage - - publish-dry-run: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - name: Install Node.js - uses: actions/setup-node@v6 - with: - node-version: latest - cache: 'pnpm' - registry-url: 'https://registry.npmjs.org' - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Check if publishable - run: pnpm publish --dry-run --recursive --no-git-checks diff --git a/.tangled/workflows/build.yml b/.tangled/workflows/build.yml new file mode 100644 index 0000000..2138a3f --- /dev/null +++ b/.tangled/workflows/build.yml @@ -0,0 +1,19 @@ +when: + - event: ["pull_request"] + branch: ["main"] + +engine: + - nixery + +dependencies: + nixpkgs: + - nodejs_24 + - pnpm + +steps: + - name: Install dependencies + command: pnpm install --frozen-lockfile + - name: Build packages + command: pnpm run build + - name: Run tests + command: pnpm run test diff --git a/.tangled/workflows/codeqa-fmt.yml b/.tangled/workflows/codeqa-fmt.yml new file mode 100644 index 0000000..b3591b6 --- /dev/null +++ b/.tangled/workflows/codeqa-fmt.yml @@ -0,0 +1,17 @@ +when: + - event: ["pull_request"] + branch: ["main"] + +engine: + - nixery + +dependencies: + nixpkgs: + - nodejs_24 + - pnpm + +steps: + - name: Install dependencies + command: pnpm install --frozen-lockfile + - name: Run formatter checks + command: npm run fmt-check diff --git a/.tangled/workflows/codeqa-lint.yml b/.tangled/workflows/codeqa-lint.yml new file mode 100644 index 0000000..aa05ec9 --- /dev/null +++ b/.tangled/workflows/codeqa-lint.yml @@ -0,0 +1,17 @@ +when: + - event: ["pull_request"] + branch: ["main"] + +engine: + - nixery + +dependencies: + nixpkgs: + - nodejs_24 + - pnpm + +steps: + - name: Install dependencies + command: pnpm install --frozen-lockfile + - name: Run linter checks + command: npm run lint diff --git a/LICENSE b/LICENSE index 101588d..e61c6a5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 _author_ +Copyright (c) 2026 _author_ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 665100c..718c4b3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This template provides a semi-minimal monorepo setup for Node.js + TypeScript pr - [x] ESM support (ECMAScript modules) - [x] [TypeDoc](https://typedoc.org/) for generating API documentation -- [x] [GitHub Actions](https://github.com/features/actions) for continuous integration +- [x] [Spindle](https://docs.tangled.org/spindles.html) for continuous integration - [x] [Dependabot](https://github.com/dependabot) for updating dependencies - [x] [node-modules-inspector](https://github.com/antfu/node-modules-inspector) for deep insights on dependency graph - [x] Uses the [VoidZero](https://voidzero.dev)-based JS toolchain @@ -17,15 +17,9 @@ This template provides a semi-minimal monorepo setup for Node.js + TypeScript pr ## Getting started ### Create a new repository - -Choose a method: - -- **GitHub UI**: Press the "Use this template" button in the top-right corner of this page. -- **GitHub CLI**: Install [GitHub CLI](https://cli.github.com). Then run one of the following: - ```shell - gh repo create --template neoncitylights/node --public --clone _repository_ # clone as public - gh repo create --template neoncitylights/node --private --clone _repository_ # clone as private - ``` +1. Clone this repository template +1. In the repository directory, remove `.git` folder with `rm -rf .git` +1. In the repository directory, Initialize git repository with `git init .` ### Replace placeholders diff --git a/packages/pkg1/README.md b/packages/pkg1/README.md index 2b692c8..c18a306 100644 --- a/packages/pkg1/README.md +++ b/packages/pkg1/README.md @@ -1,15 +1,9 @@ # @author/package [![License: MIT][license-badge]][license-url] -[![Documentation deployments][doc-deploy-badge]][doc-deploy-url] -[![Node.js workflow][ci-badge]][ci-url] [license-badge]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square [license-url]: #license -[doc-deploy-badge]: https://img.shields.io/github/deployments/_username_/_repository_/github-pages?label=deploy&style=flat-square -[doc-deploy-url]: https://github.com/_username_/_repository_/deployments/activity_log?environment=github-pages -[ci-badge]: https://img.shields.io/github/actions/workflow/status/_username_/_repository_/.github/workflows/main.yml?style=flat-square -[ci-url]: https://github.com/_username_/_repository_/actions/workflows/main.yml _desc_ diff --git a/packages/pkg1/package.json b/packages/pkg1/package.json index f18cc1b..ed23c6c 100644 --- a/packages/pkg1/package.json +++ b/packages/pkg1/package.json @@ -5,15 +5,15 @@ "keywords": [ "typescript" ], - "bugs": "https://github.com/_username_/_repository_/issues", + "bugs": "https://tangled.org/_username_/_repository_/issues", "license": "MIT", "author": { "name": "_author_", - "url": "https://github.com/_username_" + "url": "https://tangled.org/_username_" }, "repository": { "type": "git", - "url": "git+https://github.com/_username_/_repository_.git", + "url": "git+https://tangled.org/_username_/_repository_.git", "directory": "packages/pkg1" }, "files": [ -- 2.43.0