-
-
Notifications
You must be signed in to change notification settings - Fork 3
chore(cspell): add cleye to cspell and update .gitignore #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
a5d5e58
3b02cba
a06085d
6276987
7e07939
62d4ca7
7368e19
9db42c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ | |
| "barhandles", | ||
| "bluwy", | ||
| "catppuccin", | ||
| "cleye", | ||
| "commitlint", | ||
| "dotenvx", | ||
| "esbuild", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| prepare-commit-msg: | ||
| jobs: | ||
| - run: ai-commit-msg -o {1} | ||
| commit-msg: | ||
| jobs: | ||
| - run: pnpm dlx commitlint --config .config/.commitlintrc.ts --edit {1} | ||
| pre-commit: | ||
| parallel: true | ||
| jobs: | ||
| - run: auto-readme -vg | ||
| name: Update README | ||
| - run: lint-staged -v | ||
| name: Lint staged | ||
| - run: pnpm --workspace-root run scripts:lint-examples | ||
| name: Lint examples | ||
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,86 +0,0 @@ | ||
| <div align="center"> | ||
|
|
||
| # [`@stephansama`](https://github.com/stephansama/packages) packages | ||
|
|
||
| [](https://github.com/search?q=repo%3Astephansama%2Fnvim%20language%3Alua&type=code) | ||
| [](https://github.com/search?q=repo%3Astephansama%2Fnvim%20language%3ATypeScript&type=code) | ||
| [](https://turborepo.com/) | ||
|
|
||
| [](https://codecov.io/github/stephansama/packages) | ||
| [](https://github.com/stephansama/packages/actions/workflows/release.yml) | ||
| [](https://github.com/stephansama/packages/actions/workflows/github-code-scanning/codeql) | ||
|
|
||
| Collection of open-source [npm](https://www.npmx.dev/) packages | ||
|
|
||
| </div> | ||
|
|
||
| ##### Table of contents | ||
|
|
||
| <details><summary>Open Table of contents</summary> | ||
|
|
||
| - [Introduction](#introduction) | ||
| - [📦 Packages](#-packages) | ||
| - [☂️ Codecov coverage graph](#️-codecov-coverage-graph) | ||
| - [⭐ Stargazers](#-stargazers) | ||
| - [Related repositories](#related-repositories) | ||
|
|
||
| </details> | ||
|
|
||
| ## Introduction | ||
|
|
||
| view examples here 👉 [](https://pkg.pr.new/~/stephansama/packages) | ||
|
|
||
| or install an example with [`create-stephansama-example`](https://github.com/stephansama/packages/tree/main/core/example) | ||
| via `pnpm create stephansama-example` | ||
|
|
||
| ## 📦 Packages | ||
|
|
||
| All packages are packaged underneath the `@stephansama` scope (for example: `@stephansama/remark-asciinema`) | ||
|
|
||
| <!-- WORKSPACE start --> | ||
|
|
||
| ### 🏭 workspace | ||
|
|
||
| | 🏷️ Name | Version | 📥 Downloads | 📝 Description | | ||
| | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | | ||
| | [ai-commit-msg](core/ai-commit-msg/README.md) |  |  | generate commit messages using ai | | ||
| | [alfred-kaomoji](core/alfred-kaomoji/README.md) |  |  | Alfred Kaomoji Picker | | ||
| | [astro-iconify-svgmap](core/astro-iconify-svgmap/README.md) |  |  | Astro integration for generating iconify svgmaps for ssg sites | | ||
| | [auto-readme](core/auto-readme/README.md) |  |  | Generate lists and tables for your README automagically based on your repository and comments | | ||
| | [catppuccin-jsonresume-theme](core/catppuccin-jsonresume-theme/README.md) |  |  | theme for resume cli website | | ||
| | [catppuccin-opml](core/catppuccin-opml/README.md) |  |  | Catppuccin styled opml stylesheet | | ||
| | [catppuccin-rss](core/catppuccin-rss/README.md) |  |  | Catppuccin x Pretty-feed-v3 | | ||
| | [catppuccin-typedoc](core/catppuccin-typedoc/README.md) |  |  | Catppuccin css variable theme for typedoc | | ||
| | [catppuccin-xsl](core/catppuccin-xsl/README.md) |  |  | Catppuccin styles for various xsl formats | | ||
| | [create-stephansama-example](core/example/README.md) |  |  | Download an example from the @stephansama/packages examples | | ||
| | [find-makefile-targets](core/find-makefile-targets/README.md) |  |  | Find makefile targets used to pipe into fzf | | ||
| | [github-env](core/github-env/README.md) |  |  | \[Deprecated] Additional environment variable types for GitHub CI | | ||
| | [multipublish](core/multipublish/README.md) |  |  | Publish packages to multiple providers easily | | ||
| | [prettier-plugin-handlebars](core/prettier-plugin-handlebars/README.md) |  |  | Prettier plugin that automatically assigns the default parser for various handlebars files | | ||
| | [remark-asciinema](core/remark-asciinema/README.md) |  |  | A remark plugin that transforms Asciinema links into embedded players or screenshots. | | ||
| | [svelte-social-share-links](core/svelte-social-share-links/README.md) |  |  | Svelte/Web component to share the current url with various social media providers | | ||
| | [typed-env](core/typed-env/README.md) |  |  | standard schema compatible environment validator | | ||
| | [typed-events](core/typed-events/README.md) |  |  | Typed events store using standard schema | | ||
| | [typed-nocodb-api](core/typed-nocodb-api/README.md) |  |  | Typed API client for NocoDB using Zod | | ||
| | [typed-templates](core/typed-templates/README.md) |  |  | Use standard schema to validate and use handlebar template directories | | ||
| | [types-github-action-env](core/types-github-action-env/README.md) |  |  | environment variable types for GitHub Action environment | | ||
| | [types-lhci](core/types-lhci/README.md) |  |  | types for lhci configuration | | ||
|
|
||
| <!-- WORKSPACE end --> | ||
|
|
||
| <div align="center"> | ||
|
|
||
| ### ☂️ Codecov coverage graph | ||
|
|
||
|  | ||
|
|
||
| ### ⭐ Stargazers | ||
|
|
||
| [](https://github.com/stephansama/packages/stargazers) | ||
|
|
||
| </div> | ||
|
|
||
| ## Related repositories | ||
|
|
||
| - [stow.nvim](https://github.com/stephansama/stow.nvim) | ||
| - [@stephansama/actions](https://github.com/stephansama/actions) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # @stephansama/single-file | ||
|
|
||
| [](https://github.com/stephansama/packages/tree/main/core/single-file) | ||
| [](https://packages.stephansama.info/api/@stephansama/single-file) | ||
| [](https://www.npmx.dev/package/@stephansama/single-file) | ||
| [](https://jsr.io/@stephansama/single-file) | ||
| [](https://socket.dev/npm/package/@stephansama/single-file/overview) | ||
| [](https://www.npmx.dev/package/@stephansama/single-file) | ||
|
|
||
| create a single html file from a website url | ||
|
|
||
| ##### Table of contents | ||
|
stephansama marked this conversation as resolved.
|
||
|
|
||
| <details><summary>Open Table of contents</summary> | ||
|
|
||
| - [Installation](#installation) | ||
| - [Usage](#usage) | ||
|
|
||
| </details> | ||
|
|
||
| ## Installation | ||
|
|
||
| ```sh | ||
| pnpm install @stephansama/single-file | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| "use strict"; | ||
|
|
||
| import("./dist/index.js") | ||
| .then((mod) => mod.run()) | ||
| .catch((error) => { | ||
| console.error(error); | ||
| process.exit(1); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| { | ||
| "name": "@stephansama/single-file", | ||
| "version": "0.0.0", | ||
| "description": "create a single html file from a website url", | ||
| "keywords": [ | ||
| "single-file" | ||
| ], | ||
| "homepage": "https://packages.stephansama.info/api/@stephansama/single-file", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/stephansama/packages.git", | ||
| "directory": "core/single-file" | ||
| }, | ||
| "license": "MIT", | ||
| "author": { | ||
| "name": "Stephan Randle", | ||
| "email": "stephanrandle.dev@gmail.com", | ||
| "url": "https://stephansama.info" | ||
| }, | ||
| "type": "module", | ||
| "exports": { | ||
| ".": { | ||
| "import": "./dist/index.js", | ||
| "require": "./dist/index.cjs" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
| "main": "./dist/index.cjs", | ||
| "module": "./dist/index.js", | ||
| "types": "./dist/index.d.cts", | ||
|
Comment on lines
+21
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial 🧩 Analysis chain🌐 Web query:
💡 Result: Best practices for package.json exports with "types" conditions and moduleResolution: "nodenext": Use conditional exports in package.json to specify different entry points for JS runtimes and TypeScript. For NodeNext (modern Node.js + TypeScript alignment), set "moduleResolution": "nodenext" (or "node16") in tsconfig.json. This respects package.json "exports", "type": "module", and requires explicit .js extensions in ESM imports. Key pattern for exports (order matters - most specific first): json { "name": "my-package", "type": "module", "exports": { ".": { "types": "./dist/index.d.ts", // TypeScript entry - MUST precede "default" "default": "./dist/index.js" // Runtime fallback (Node.js uses this) }, "./subpath": { "types": "./dist/subpath.d.ts", "default": "./dist/subpath.js" } } } - "types" condition: TypeScript (with nodenext) checks this first for .d.ts/.d.ts files. Use .d.ts for ESM types, .d.cts for CJS. - "default": Universal fallback for Node.js and other runtimes. - For dual CJS/ESM support: Add "import": "./esm/index.js", "require": "./cjs/index.cjs" before "default". - Node.js conditions (in priority order): import/require > node > default. TypeScript overlays "types" early. - Always include "types" before "default" - if after, TypeScript ignores it. - For subpaths: Use "./subpath": {...} to expose specific files; unlisted paths are blocked (encapsulation). - Fallback: Keep top-level "types": "./dist/index.d.ts" and "main": "./dist/index.js" for older tools/Node. Consumers: Use "module": "nodenext", "moduleResolution": "nodenext" for full Node.js compatibility. Explicit extensions in ESM: import {x} from "./file.js". This ensures type safety, runtime consistency, and works across Node.js, TypeScript, bundlers (with caveats on conditions). Validate with publint or arethetypeswrong.com. Citations:
🏁 Script executed: # Check for tsdown config and build output structure
find . -name "tsdown.config.*" -o -name "dist" -type d | head -20Repository: stephansama/packages Length of output: 1359 🏁 Script executed: # Check current build/types configuration files
fd -t f "(tsconfig|build|vite|rollup)" . --max-depth 3Repository: stephansama/packages Length of output: 1482 🏁 Script executed: # Look at the actual dist directory if it exists and check what type files are there
if [ -d "core/single-file/dist" ]; then
ls -la core/single-file/dist/ | grep -E "\.(d\.ts|d\.cts|js|cjs|mjs)$"
fiRepository: stephansama/packages Length of output: 46 🏁 Script executed: # Check the full package.json structure for context
cat core/single-file/package.json | head -40Repository: stephansama/packages Length of output: 1108 🏁 Script executed: # Check tsdown.config.ts to understand type emission setup
cat core/single-file/tsdown.config.tsRepository: stephansama/packages Length of output: 264 🏁 Script executed: # Also check if there's a src/index.ts or similar
ls -la core/single-file/src/ 2>/dev/null || ls -la core/single-file/ | grep -E "\.(ts|js|mjs)$" | head -20Repository: stephansama/packages Length of output: 232
With Since Expected structure "exports": {
".": {
- "import": "./dist/index.js",
- "require": "./dist/index.cjs"
+ "import": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "require": {
+ "types": "./dist/index.d.cts",
+ "default": "./dist/index.cjs"
+ }
},Keep top-level 🤖 Prompt for AI Agents |
||
| "bin": "./cli.mjs", | ||
| "files": [ | ||
| "cli.mjs", | ||
| "dist" | ||
| ], | ||
| "scripts": { | ||
| "build": "tsdown", | ||
| "dev": "tsdown --watch", | ||
| "lint": "eslint ./ --pass-on-no-patterns --no-error-on-unmatched-pattern", | ||
| "lint:fix": "eslint ./ --fix" | ||
| }, | ||
| "dependencies": { | ||
| "cheerio": "catalog:", | ||
| "dedent": "catalog:", | ||
| "he": "catalog:", | ||
| "ky": "catalog:", | ||
| "obug": "catalog:cli", | ||
| "oxc-parser": "catalog:", | ||
| "svg-sprite-loader": "catalog:" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/he": "catalog:", | ||
| "cleye": "catalog:cli", | ||
| "tsdown": "catalog:" | ||
| }, | ||
|
Comment on lines
+42
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Move 🤖 Prompt for AI Agents |
||
| "publishConfig": { | ||
| "access": "public", | ||
| "provenance": true | ||
| }, | ||
| "readme": "./README.md" | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
lefthook parallel jobs stage_fixed file mutation ordering💡 Result:
In Lefthook, particularly for pre-commit hooks using parallel jobs (via parallel: true at the hook level or within group: parallel: true in the jobs feature added in v1.10.0), combined with stage_fixed: true on multiple jobs/commands that mutate the same files (e.g., linters/formatters like ESLint and Prettier with --fix), there is a risk of file mutation ordering issues. Key behaviors: - Jobs/commands with stage_fixed: true run git add on the relevant files (filtered by glob, exclude, etc., using {staged_files} or custom files) automatically after their execution. This only applies to pre-commit hooks. - When parallel: true, multiple such jobs execute concurrently. Lefthook performs git add concurrently for each job after its command completes. - For overlapping files mutated by multiple jobs: The final file content is determined by whichever job finishes last (the "winner"), as tools typically overwrite files. Lefthook then stages the final versions concurrently, so the last mutation persists in the index. This can lead to unpredictable results or race conditions if jobs interfere (e.g., one formatter overriding another). Official docs show examples with multiple parallel stage_fixed: true jobs on different root/ glob paths (e.g., backend vs. frontend), implying safety when paths don't overlap. For overlapping files, run sequentially (parallel: false or piped: true groups) or use non-overlapping filters to avoid mutations on the same files. To enforce ordering: - Use jobs with named groups: Sequential top-level jobs run in definition order; parallel within groups. - Unnamed jobs append in definition order. Example safe config (non-overlapping): pre-commit: parallel: true jobs: - name: migrate root: backend/ glob: db/migrations/* group: piped: true jobs: - run: bundle install - run: rails db:migrate - run: yarn lint --fix {staged_files} root: frontend/ stage_fixed: true # Safe if no overlap For overlapping mutations, prefer sequential execution or tools that don't conflict.
Citations:
parallel: truework with priorities evilmartians/lefthook#846Parallel pre-commit jobs with overlapping file mutations create race conditions.
Both
auto-readme -vgandlint-staged -vmodify README and source files. When run in parallel withparallel: true, whichever job finishes last determines the final file state, and concurrentgit addoperations become unpredictable. Additionally, your current config does not usestage_fixed: true, so Lefthook won't automatically re-stage file changes—mutations are made to disk but remain unstaged.Either run these jobs sequentially (remove
parallel: trueor move them to separate sequential groups), or addstage_fixed: trueto each file-mutating job to ensure Lefthook re-stages their output. The read-onlylint-examplesjob can remain parallel.🛠️ Suggested structure
Alternatively, keep
parallel: trueat hook level and use sequential grouping for file-mutating jobs only:🤖 Prompt for AI Agents