Skip to content

Commit

Permalink
Merge branch 'main' into add-generic-template-args
Browse files Browse the repository at this point in the history
  • Loading branch information
BierDav authored Nov 18, 2024
2 parents 0311699 + f9e6694 commit 5fa818c
Show file tree
Hide file tree
Showing 278 changed files with 20,122 additions and 10,498 deletions.
5 changes: 0 additions & 5 deletions .changeset/nervous-dodos-deny.md

This file was deleted.

39 changes: 0 additions & 39 deletions .eslintrc

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Setup prettier cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules/.cache/prettier
key: prettier-${{ github.sha }}
Expand All @@ -34,15 +34,15 @@ jobs:
run: pnpm run format

- name: Add, Commit and Push
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Format"

- name: Update Readme
run: pnpm run update-readme

- name: Add, Commit and Push
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update Readme"
file_pattern: README.md
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: pnpm

- name: Install Dependencies
run: pnpm i

- name: Cache turbo build setup
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules/.cache/turbo
key: turbo-${{ github.sha }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Cache turbo build setup
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules/.cache/turbo
key: turbo-${{ github.sha }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ node_modules/
jspm_packages/
dist/


# TypeScript v1 declaration files
typings/

Expand Down Expand Up @@ -153,6 +154,7 @@ dist/

# vscode settings
.vscode/settings.json
.vscode/launch.json

# Temporary folders
tmp/
Expand Down
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

13 changes: 7 additions & 6 deletions README.md

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions configs/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import { defineConfig } from "vitest/config";
import solidPlugin from "vite-plugin-solid";
import * as utils from "../scripts/utils/index.js"

const fromRoot = process.env.CI === "true";
const package_name = utils.getPackageNameFromCWD()

if (package_name == null) {
utils.logLine("Testing ALL packages...")
} else {
utils.logLine("Testing "+package_name+" package...")
}

const from_root = package_name == null

export default defineConfig(({ mode }) => {
// test in server environment
Expand All @@ -25,7 +34,7 @@ export default defineConfig(({ mode }) => {
transformMode: {
web: [/\.[jt]sx$/],
},
...(fromRoot
...(from_root
? // Testing all packages from root
{
...(testSSR && { include: ["packages/*/test/server.test.{ts,tsx}"] }),
Expand Down
50 changes: 50 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import noOnlyTests from "eslint-plugin-no-only-tests";
import eslintComments from "eslint-plugin-eslint-comments";
import tsParser from "@typescript-eslint/parser";

/** @type {import("eslint").Linter.Config} */
export default {

files: ["**/*.{js,mjs,jsx,ts,tsx}"],
ignores: ["**/{dist,node_modules,__snapshots__}/**/*", "packages/*/dev/**/*", "site/**/*"],

plugins: {
"@typescript-eslint": typescriptEslint,
"no-only-tests": noOnlyTests,
"eslint-comments": eslintComments,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: "module",

parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: ".",
},
},

rules: {
"no-console": "warn",
"no-debugger": "warn",
"prefer-const": "warn",

"@typescript-eslint/no-unused-vars": ["warn", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
}],

"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
"@typescript-eslint/no-useless-empty-export": "warn",
"eslint-comments/no-unused-disable": "warn",
"no-only-tests/no-only-tests": "warn",
},
};
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[build]
base = "/"
publish = "site/dist/public"
publish = "site/dist"
command = "pnpm build && pnpm -dir site run deploy"
58 changes: 26 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"scripts": {
"dev": "pnpm -dir site run dev",
"format": "prettier --cache -w {site,packages,scripts,template}/**/*.{js,ts,json,css,tsx,jsx,md,html} --ignore-path .gitignore",
"lint:packages": "eslint --ignore-path .gitignore --max-warnings 0 packages/*/src/**/*",
"lint:tests": "eslint --ignore-path .gitignore packages/*/test/** --quiet --rule \"no-only-tests/no-only-tests: error\"",
"lint": "concurrently pnpm:lint:*",
"test:client": "cross-env CI=true vitest -c ./configs/vitest.config.ts",
"lint:packages": "eslint --max-warnings 0 \"packages/*/src/**/*\"",
"lint:tests": "eslint \"packages/*/test/**\" --rule \"no-only-tests/no-only-tests: error\"",
"lint": "pnpm run \"/^lint:.*/\"",
"test:client": "vitest -c ./configs/vitest.config.ts",
"test:ssr": "pnpm run test:client --mode ssr",
"test": "pnpm run test:client && pnpm run test:ssr",
"build:ci": "turbo run build --filter='./packages/*'",
Expand All @@ -28,42 +28,36 @@
"release": "pnpm build && changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@solidjs/testing-library": "^0.8.5",
"@types/fs-extra": "^11.0.4",
"@types/jsdom": "^21.1.6",
"@types/node": "^20.10.5",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"@changesets/cli": "^2.27.8",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"@typescript-eslint/parser": "^8.5.0",
"esbuild": "^0.19.11",
"eslint": "^8.56.0",
"eslint": "^9.10.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"fs-extra": "^11.2.0",
"gzip-size": "^7.0.0",
"jsdom": "^22.1.0",
"eslint-plugin-no-only-tests": "^3.3.0",
"jsdom": "^25.0.0",
"json-to-markdown-table": "^1.0.0",
"prettier": "^3.1.1",
"prettier-plugin-tailwindcss": "^0.5.9",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.6",
"rehype-autolink-headings": "^7.1.0",
"rehype-highlight": "^7.0.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
"solid-devtools": "^0.29.2",
"solid-js": "^1.8.7",
"solid-start": "^0.3.10",
"tsup": "^7.2.0",
"solid-js": "^1.8.22",
"@solidjs/start": "^1.0.6",
"tsup": "^8.2.4",
"tsup-preset-solid": "^2.2.0",
"tsx": "^4.7.0",
"turbo": "^1.11.2",
"typescript": "~5.2.2",
"tsx": "^4.19.1",
"turbo": "^1.12.5",
"vinxi": "^0.4.2",
"vite-plugin-solid": "^2.10.2",
"typescript": "~5.6.2",
"valibot": "^0.20.1",
"vite": "^4.5.1",
"vite-plugin-solid": "^2.8.0",
"vitest": "^0.34.6"
"vite": "5.4.4",
"vitest": "^2.1.0"
},
"packageManager": "pnpm@8.15.6+sha256.01c01eeb990e379b31ef19c03e9d06a14afa5250b82e81303f88721c99ff2e6f",
"engines": {"node": ">=18.0.0"}
"packageManager": "pnpm@9.9.0",
"engines": {"node": ">=20.0.0"}
}
8 changes: 4 additions & 4 deletions packages/active-element/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

##### Non-reactive primitives:

- [`makeActiveElementListener`](#makeActiveElementListener) - Listen for changes to the `document.activeElement`.
- [`makeFocusListener`](#makeFocusListener) - Attaches "blur" and "focus" event listeners to the element.
- [`makeActiveElementListener`](#makeactiveelementlistener) - Listen for changes to the `document.activeElement`.
- [`makeFocusListener`](#makefocuslistener) - Attaches "blur" and "focus" event listeners to the element.

##### Reactive primitives:

- [`createActiveElement`](#createActiveElement) - Provides reactive signal of `document.activeElement`.
- [`createFocusSignal`](#createFocusSignal) - Provides a signal representing element's focus state.
- [`createActiveElement`](#createactiveelement) - Provides reactive signal of `document.activeElement`.
- [`createFocusSignal`](#createfocussignal) - Provides a signal representing element's focus state.

##### Directives:

Expand Down
9 changes: 6 additions & 3 deletions packages/active-element/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { fireEvent, createEvent } from "@solidjs/testing-library";
import { createRoot } from "solid-js";
import { describe, test, expect } from "vitest";
import {
Expand All @@ -9,8 +8,12 @@ import {
focus,
} from "../src/index.js";

const dispatchFocusEvent = (target: Element | Window = window, event: "focus" | "blur" = "focus") =>
fireEvent(target, createEvent(event, window));
const dispatchFocusEvent = (
target: Element | Window = window,
event: "focus" | "blur" = "focus",
) => {
target.dispatchEvent(new FocusEvent(event));
};

describe("makeActiveElementListener", () => {
test("works properly", () =>
Expand Down
8 changes: 8 additions & 0 deletions packages/audio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @solid-primitives/audio

## 1.3.18

### Patch Changes

- b993fff: Set "COMPLETE" state on "ended"

Improved ssr support by setting the initial duration and volume to zero for `createAudio` to match the server state.

## 1.3.17

### Patch Changes
Expand Down
Loading

0 comments on commit 5fa818c

Please sign in to comment.