Skip to content
Merged
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
7 changes: 2 additions & 5 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
Run `pnpm run plan` and describe each user-visible package change. Commit the generated changeset with the code it describes.

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
On `main`, the release workflow uses Changesets to maintain a release pull request. Merging that pull request publishes changed public packages through npm trusted publishing.
28 changes: 14 additions & 14 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": {
"tag": false,
"version": false
}
}
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": {
"tag": false,
"version": false
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
title: ""
labels: ""
assignees: YLfjuk

---

**Is your feature request related to a specific package? Please specify.**
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 20.x
uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v7
with:
node-version: 20.x
fetch-depth: 0

- name: Set up pnpm
uses: pnpm/action-setup@v6

- name: Install Dependencies
run: npm i
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org
package-manager-cache: false

- name: Install Optional Dependencies
run: npm i @rollup/rollup-linux-x64-gnu
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build Packages
run: npm run build
- name: Build and check packages
run: pnpm run build

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
- name: Create release pull request or publish
uses: changesets/action@v2
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-script: pnpm run release
55 changes: 55 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Validation

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Set up pnpm
uses: pnpm/action-setup@v6

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm

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

- name: Check formatting
run: pnpm run fmt:check

- name: Lint
run: pnpm run lint

- name: Check types
run: pnpm run test:types

- name: Test
run: pnpm run test

- name: Check coverage
run: pnpm run coverage

- name: Build and check packages
run: pnpm run build

- name: Audit dependencies
run: pnpm audit
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# ignore top-level vscode settings
.vscode/settings.json
.artifacts

# build output
dist/
Expand Down
10 changes: 5 additions & 5 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "@ylfjuk/md",
"MD013": {
"line_length": 120
}
}
"extends": "@ylfjuk/md",
"MD013": {
"line_length": 120
}
}
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
# @ylfjuk/core · ![GitHub License](https://img.shields.io/github/license/ylfjuk/core) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk%2Fcore?label=core&logo=typescript) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk-core%2Ftypes?label=types&logo=typescript) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk-core%2Futils?label=utils&logo=typescript)

The core packages for `@ylfjuk` projects
Shared types and utilities for `@ylfjuk` projects.

## Packages

- [@ylfjuk/core](packages/core/README.md)
- [@ylfjuk-core/types](packages/types/README.md)
- [@ylfjuk-core/utils](packages/utils/README.md)
- [`@ylfjuk/core`](packages/core/README.md) re-exports the complete public API.
- [`@ylfjuk-core/types`](packages/types/README.md) provides TypeScript utility types.
- [`@ylfjuk-core/utils`](packages/utils/README.md) provides runtime utilities.

The runtime packages are ESM-only and target ES2024. Use `import`, not `require`.

## Development

Development requires Node.js 22.18.0 or newer and the pnpm version declared in `package.json`.

```sh
pnpm install --frozen-lockfile
pnpm run fmt:check
pnpm run lint
pnpm run test:types
pnpm run test
pnpm run coverage
pnpm run build
```

Oxfmt and Oxlint handle formatting and linting, Vitest runs tests and coverage, TypeScript checks declarations, and tsdown builds and validates publishable packages with publint and Are the Types Wrong.

## Releases

Add a changeset with `pnpm run plan`. Merges to `main` update a release pull request; merging that pull request publishes changed packages through npm trusted publishing.

Each public package must trust GitHub owner `YLfjuk`, repository `core`, workflow `release.yml`, with only `npm publish` allowed. The workflow uses OIDC and does not use an npm token.

## License

Expand Down
21 changes: 0 additions & 21 deletions biome.json

This file was deleted.

8 changes: 8 additions & 0 deletions oxfmt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { createOxfmtConfig } from "@ylfjuk/oxc/oxfmt";

const config = createOxfmtConfig({
ignorePatterns: ["**/dist/**", "**/node_modules/**", "**/coverage/**", "**/.turbo/**"],
scopes: ["ylfjuk", "ylfjuk-core"],
});

export default { ...config, endOfLine: "lf" };
11 changes: 11 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { createOxlintConfig } from "@ylfjuk/oxc/oxlint";

const config = createOxlintConfig({ jsdoc: true });

export default {
...config,
rules: {
...config.rules,
"jsdoc/check-tag-names": ["error", { definedTags: ["remarks"] }],
},
};
Loading