Skip to content

Commit

Permalink
Next (#1)
Browse files Browse the repository at this point in the history
* chore(repo): Create .gitignore

* chore(repo): Update .gitignore

* chore(repo): wip

* chore(repo): Update .gitignore

* chore(repo): Update .gitignore

* wip

* wip
  • Loading branch information
octoper authored Mar 27, 2024
1 parent 17f23fe commit 4d46674
Show file tree
Hide file tree
Showing 13 changed files with 4,430 additions and 5,227 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Release
run-name: Release

on:
push:
branches:
- main

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

jobs:
release:
name: Release
if: ${{ github.repository == 'squaredasher/qwiky' }}
runs-on: [ubuntu-latest]

permissions:
contents: write
id-token: write
packages: write
pull-requests: write
issues: read
statuses: write
checks: write

steps:
- name: Echo github context
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}

- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: |
pnpm install
- name: Build release
run: pnpm run build -- --force

- name: Create Release PR
id: changesets
uses: changesets/action@v1
with:
commit: "chore(repo): Version packages"
publish: npm run release
# Workaround for https://github.com/changesets/changesets/issues/421
version: npm run version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Editor
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Dependencies
node_modules
.pnp
.pnp.js

# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Testing
coverage

# Turbo
.turbo

# Cache
.cache
.mf
.vscode
.rollup.cache
tsconfig.tsbuildinfo

# Build Outputs
out/
build
dist

# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
.DS_Store
*.pem
46 changes: 24 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,35 @@
"dev": "turbo run dev --filter='./packages/**'",
"play": "turbo run dev --filter='./playground/'",
"lint": "turbo run lint",
"lint:fix": "turbo run lint:fix",
"lint:fix": "turbo run lint -- --fix",
"typecheck": "tsc --noEmit",
"test": "vitest",
"changeset": "changeset",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"release": "changeset publish && git push --follow-tags",
"version": "changeset version && npm install --package-lock-only"
},
"devDependencies": {
"@builder.io/qwik": "^1.2.5",
"@changesets/cli": "^2.26.2",
"@storybook/addon-essentials": "7.0.26",
"@storybook/addon-links": "7.0.26",
"@storybook/blocks": "7.0.26",
"@storybook/builder-vite": "7.0.26",
"@storybook/html": "7.0.26",
"@storybook/html-vite": "7.0.26",
"@types/jsdom": "^21.1.1",
"eslint": "^8.44.0",
"esno": "^0.16.3",
"prettier": "^3.0.0",
"rimraf": "^5.0.1",
"storybook": "7.0.26",
"storybook-framework-qwik": "0.2.3",
"turbo": "^1.10.7",
"typescript": "^5.1.6",
"vite": "^4.4.1",
"vite-plugin-dts": "^3.1.0",
"vitest": "^0.33.0"
"@builder.io/qwik": "^1.5.1",
"@changesets/cli": "^2.27.1",
"@storybook/addon-essentials": "8.0.4",
"@storybook/addon-links": "8.0.4",
"@storybook/blocks": "8.0.4",
"@storybook/builder-vite": "8.0.4",
"@storybook/html": "8.0.4",
"@storybook/html-vite": "8.0.4",
"@types/jsdom": "^21.1.6",
"eslint": "^8.57.0",
"esno": "^4.7.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"storybook": "8.0.4",
"storybook-framework-qwik": "0.4.0",
"turbo": "^1.13.0",
"typescript": "^5.4.3",
"vite": "^5.2.6",
"vite-plugin-dts": "^3.7.3",
"vitest": "^1.4.0"
}
}
24 changes: 12 additions & 12 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
"@builder.io/qwik": ">=1.0.0"
},
"devDependencies": {
"@types/eslint": "8.40.2",
"@types/node": "^20.4.0",
"@typescript-eslint/eslint-plugin": "5.61.0",
"@typescript-eslint/parser": "5.61.0",
"eslint": "8.44.0",
"eslint-plugin-qwik": "^1.2.5",
"np": "^8.0.4",
"prettier": "3.0.0",
"typescript": "5.1.6",
"undici": "5.22.1",
"vite": "4.4.1",
"vite-tsconfig-paths": "4.2.0"
"@types/eslint": "8.56.6",
"@types/node": "^20.11.30",
"@typescript-eslint/eslint-plugin": "7.4.0",
"@typescript-eslint/parser": "7.4.0",
"eslint": "8.57.0",
"eslint-plugin-qwik": "^1.5.1",
"np": "^10.0.2",
"prettier": "3.2.5",
"typescript": "5.4.3",
"undici": "6.10.1",
"vite": "5.2.6",
"vite-tsconfig-paths": "4.3.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useFocus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function useFocus<T extends HTMLElement = HTMLDivElement>(
ref.value?.removeEventListener('blur', onBlur)
})
}
})
} )

return {
focused,
Expand Down
1 change: 0 additions & 1 deletion packages/hooks/src/useMediaQuery/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useSignal, useVisibleTask$ } from '@builder.io/qwik'
import { isServer } from '@builder.io/qwik/build'

const MEDIA = new Map<string, MediaQueryList>()

Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useTextSelection/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $, noSerialize, useComputed$, useOnDocument, useSignal, useVisibleTask$ } from '@builder.io/qwik'
import { $, noSerialize, useComputed$, useOnDocument, useSignal } from '@builder.io/qwik'
import type { NoSerialize } from '@builder.io/qwik'

function getRangesFromSelection(selection: Selection) {
Expand Down
2 changes: 0 additions & 2 deletions packages/hooks/src/useWindowSize/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ const Test = component$(() => {
const {width, height} = useWindowSize();
return (
<div>
<span>This does not seems to work in Storybook</span>

Window Height: {width.value} x {height.value}
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useWindowSize/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $, useOnDocument, useOnWindow, useSignal, useVisibleTask$ } from '@builder.io/qwik'
import { $, useOnWindow, useSignal, useVisibleTask$ } from '@builder.io/qwik'

export interface UseWindowSizeOptions {
initialWidth?: number
Expand Down
7 changes: 2 additions & 5 deletions packages/hooks/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import type { Signal } from '@builder.io/qwik'
import { useSignal, } from '@builder.io/qwik'
import { useSignal, isSignal as baseIsSignal } from '@builder.io/qwik'
import type { AnyFn, MaybeSignal, MaybeSignalOrGetter } from './type'

export function isSignal<T>(r: Signal<T> | unknown): r is Signal<T>
export function isSignal(r: any): r is Signal {
return !!(r && typeof r === 'object' && hasOwn(r, 'untrackedValue'))
}
export const isSignal = baseIsSignal

export function isDef<T = any>(val?: T): val is T {
return typeof val !== 'undefined'
Expand Down
34 changes: 17 additions & 17 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@
"qwik": "qwik"
},
"devDependencies": {
"@builder.io/partytown": "^0.8.0",
"@builder.io/qwik": "1.2.5",
"@builder.io/qwik-city": "1.2.5",
"@types/eslint": "8.40.2",
"@types/node": "^20.4.0",
"@typescript-eslint/eslint-plugin": "5.61.0",
"@typescript-eslint/parser": "5.61.0",
"autoprefixer": "^10.4.14",
"eslint": "8.44.0",
"eslint-plugin-qwik": "1.2.5",
"postcss": "^8.4.25",
"prettier": "3.0.0",
"tailwindcss": "^3.3.2",
"typescript": "5.1.6",
"undici": "5.22.1",
"vite": "4.4.1",
"vite-tsconfig-paths": "4.2.0"
"@builder.io/partytown": "^0.10.1",
"@builder.io/qwik": "1.5.1",
"@builder.io/qwik-city": "1.5.1",
"@types/eslint": "8.56.6",
"@types/node": "^20.11.30",
"@typescript-eslint/eslint-plugin": "7.4.0",
"@typescript-eslint/parser": "7.4.0",
"autoprefixer": "^10.4.19",
"eslint": "8.57.0",
"eslint-plugin-qwik": "1.5.1",
"postcss": "^8.4.38",
"prettier": "3.2.5",
"tailwindcss": "^3.4.1",
"typescript": "5.4.3",
"undici": "6.10.1",
"vite": "5.2.6",
"vite-tsconfig-paths": "4.3.2"
},
"dependencies": {
"@qwiky/hooks": "workspace:*"
Expand Down
3 changes: 2 additions & 1 deletion playground/src/components/partytown/partytown.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { partytownSnippet, PartytownConfig } from '@builder.io/partytown/integration';
import type { PartytownConfig } from '@builder.io/partytown/integration';
import { partytownSnippet } from '@builder.io/partytown/integration';

/**
* Props for `<QwikPartytown/>`, which extends the Partytown Config.
Expand Down
Loading

0 comments on commit 4d46674

Please sign in to comment.