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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/01-command_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ body:
description: List necessary versions here. This includes your package version, runtime version, operating system etc.
placeholder: |
- @nanoforge-dev/editor 1.0.0 (`npm ls @nanoforge-dev/editor`)
- Node.js 24.11.0 (`node --version`)
- Node.js 25.x.x (`node --version`)
- TypeScript 5.9.3 (`npm ls typescript` if you use it)
- macOS Ventura 13.3.1
validations:
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
with:
swap-size-gb: 10

- uses: pnpm/action-setup@v4.1.0
- uses: pnpm/action-setup@v4.2.0
name: Install pnpm
with:
run_install: false
Expand All @@ -26,7 +26,7 @@ runs:
run: |
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
- uses: actions/cache@v5
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
Expand Down
31 changes: 31 additions & 0 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: prepare
description: Prepare action
inputs:
node-install:
description: Install node
default: 'true'
pnpm-install:
description: Install pnpm depedencies
default: 'true'
build:
description: Build packages
default: 'true'
runs:
using: composite
steps:
- if: inputs.node-install == 'true'
name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 25
package-manager-cache: false
registry-url: https://registry.npmjs.org

- if: inputs.pnpm-install == 'true'
name: Install dependencies
uses: ./.github/actions/pnpm-install

- if: inputs.build == 'true'
name: Build packages
shell: bash
run: pnpm run build
41 changes: 41 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Pre-Release

on:
workflow_dispatch:
inputs:
version:
description: 'New version of the package (leave empty for auto generated version)'
type: string
required: false
dry_run:
description: Perform a dry run?
type: boolean
default: false

permissions:
contents: write
pull-requests: write

jobs:
create-release-pr:
name: Create release pr
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev'
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true

- name: Prepare
uses: ./.github/actions/prepare

- name: Release packages
uses: ./node_modules/@nanoforge-dev/actions/dist/create-release-pr
with:
package: '@nanoforge-dev/editor'
version: ${{ inputs.version }}
dry: ${{ inputs.dry_run }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release Tag

on:
pull_request:
types:
- closed
branches:
- main

permissions:
contents: write

jobs:
create-release-tag:
name: Create release tag
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/')
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Prepare
uses: ./.github/actions/prepare

- name: Create release tag
uses: ./node_modules/@nanoforge-dev/actions/dist/create-release-tag
with:
commit: ${{ github.sha }}
branch: ${{ github.head_ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 2 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

- name: Install Node.js v24
uses: actions/setup-node@v6
with:
node-version: 24
package-manager-cache: false
registry-url: https://registry.npmjs.org/

- name: Install dependencies
uses: ./.github/actions/pnpm-install

- name: Build dependencies
run: pnpm run build
- name: Prepare
uses: ./.github/actions/prepare

- name: Release packages
uses: ./node_modules/@nanoforge-dev/actions/dist/release-packages
with:
package: '@nanoforge-dev/editor'
exclude: ''
dry: ${{ inputs.dry_run }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests

on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Prepare
uses: ./.github/actions/prepare

- name: Run linter
run: pnpm lint
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pnpm --no-install lint-staged
pnpm format
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v23.6.0
v25
24 changes: 20 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Ignore files for PNPM, NPM and YARN
.idea/
.vscode/

.svelte-kit/
dist/
node_modules/

pnpm-lock.yaml
package-lock.json
yarn.lock
bun.lock
pnpm-workspace.yaml

CHANGELOG.md

coverage/
test-results/

project.inlang/cache/
project.inlang/.gitignore
project.inlang/.meta.json
project.inlang/README.md

src/lib/paraglide/
12 changes: 0 additions & 12 deletions .prettierrc

This file was deleted.

38 changes: 2 additions & 36 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
import pluginJs from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintConfig from '@nanoforge-dev/utils-eslint-config';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import tseslint from 'typescript-eslint';

import svelteConfig from './svelte.config.js';

export default [
{ files: ['src/**/*.{ts}'] },
...eslintConfig,
{ languageOptions: { globals: globals.browser } },

pluginJs.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.strict,
eslintConfigPrettier,
...svelte.configs.recommended,
...svelte.configs.prettier,

{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
Expand All @@ -28,37 +21,10 @@ export default [
},
},
},

{
rules: {
'no-console': 'error',
'svelte/no-unused-svelte-ignore': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{
disallowTypeAnnotations: true,
fixStyle: 'inline-type-imports',
prefer: 'type-imports',
},
],
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/member-ordering': [
'error',
{
default: [
'static-field',
'field',
'public-static-method',
'constructor',
'method',
'protected-method',
'private-method',
],
},
],
},
},
];
Loading