Skip to content

Commit d0d0980

Browse files
authored
chore: bump deps (#89)
* chore: upgrade renovate config * refactor: configs * refactor: useVueLogger now accepts logLevel * fix: remove old e2e config * docs: update README
1 parent ebd17c4 commit d0d0980

22 files changed

+1615
-1422
lines changed

.github/renovate.json

+7-25
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,17 @@
11
{
2-
"extends": [
3-
"config:base",
4-
"group:all",
5-
"schedule:weekly",
6-
":widenPeerDependencies"
7-
],
8-
"enabledManagers": [
9-
"npm"
10-
],
2+
"extends": ["config:recommended", "group:all", "schedule:weekly", ":widenPeerDependencies"],
3+
"enabledManagers": ["npm"],
114
"packageRules": [
125
{
13-
"matchManagers": [
14-
"npm"
15-
],
6+
"matchManagers": ["npm"],
167
"automerge": true,
17-
"stabilityDays": 2
18-
},
19-
{
20-
"matchPackagePatterns": [
21-
"npm"
22-
],
23-
"rangeStrategy": "auto"
8+
"minimumReleaseAge": "2 days"
249
},
2510
{
26-
"matchPackageNames": [
27-
"vite-plugin-dts"
28-
],
29-
"matchCurrentVersion": "3.2.0",
30-
"enabled": false
11+
"rangeStrategy": "auto",
12+
"matchPackageNames": ["/npm/"]
3113
}
3214
],
3315
"timezone": "Europe/Helsinki",
3416
"dependencyDashboard": true
35-
}
17+
}

.github/workflows/release.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
on:
2-
push:
2+
workflow_run:
3+
workflows: ['Tests']
4+
types:
5+
- completed
36
branches:
47
- main
8+
workflow_dispatch:
59

610
jobs:
711
publish:
812
runs-on: ubuntu-latest
13+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
14+
915
steps:
1016
- uses: actions/checkout@v3
1117
- uses: pnpm/action-setup@v2

.github/workflows/test.yml

-58
This file was deleted.

.github/workflows/e2e.yml .github/workflows/tests.yml

+28-14
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,74 @@
1-
name: E2E Test
1+
name: Tests
22

33
on:
44
push:
55
branches:
66
- main
77
paths:
8-
- '.github/workflows/e2e.yml'
8+
- '.github/workflows/tests.yml'
99
- 'pnpm-lock.yaml'
1010
- 'src/**/*.ts'
1111
- 'src/**/*.vue'
12-
- 'tests/e2e/*.spec.ts'
12+
- 'tests/**/*.ts'
1313
pull_request:
1414
paths:
15-
- '.github/workflows/e2e.yml'
15+
- '.github/workflows/tests.yml'
1616
- 'pnpm-lock.yaml'
1717
- 'src/**/*.ts'
1818
- 'src/**/*.vue'
19-
- 'tests/e2e/*.spec.ts'
19+
- 'tests/**/*.ts'
2020
workflow_dispatch:
2121

2222
concurrency:
23-
group: e2e-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
23+
group: tests-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2424
cancel-in-progress: true
2525

2626
jobs:
2727
e2e-tests:
2828
runs-on: ubuntu-latest
2929

3030
env:
31+
CI: 1
3132
DEBUG: 0
3233
PLAYWRIGHT_BROWSERS_PATH: 0
3334

3435
steps:
35-
- uses: actions/checkout@v3
36-
- uses: actions/cache@v3
36+
- uses: actions/checkout@v4.2.2
37+
- uses: actions/cache@v4.1.2
3738
with:
3839
path: /home/runner/.local/share/pnpm/store
3940
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
4041
restore-keys: |
4142
${{ runner.os }}-
42-
- uses: pnpm/action-setup@v2
43+
- uses: pnpm/action-setup@v2.4.1
4344
with:
44-
version: 8
45+
version: 9
4546
run_install: true
46-
- uses: actions/setup-node@v3
47+
- uses: actions/setup-node@v4.1.0
4748
with:
48-
node-version: 18
49+
node-version: 22
4950
cache: 'pnpm'
5051

52+
- name: Build
53+
run: pnpm build
54+
55+
- name: Test
56+
run: pnpm coverage
57+
58+
- name: Component Coverage
59+
uses: davelosert/[email protected]
60+
if: ${{ always() }}
61+
with:
62+
working-directory: ./
63+
vite-config-path: ./vite.config.ts
64+
5165
- name: Install Playwright browsers
5266
run: npx playwright install --with-deps
5367

5468
- name: Run e2e tests
55-
run: pnpm test-e2e-ci
69+
run: pnpm test:ci-e2e
5670

57-
- uses: actions/upload-artifact@v3
71+
- uses: actions/upload-artifact@v4.4.3
5872
if: always()
5973
with:
6074
name: playwright-report

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DS_Store
22
node_modules
33
dist
4+
*.tsbuildinfo
45

56
/tests/e2e/videos/
67
/tests/e2e/screenshots/

CHANGES.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
### 0.3.0 - 2024-11-14
4+
5+
- refactor: changed `useVueLogger` to accept logLevel argument
6+
- ci: only release after tests pass
7+
- chore: upgrade Renovate config
8+
- chore: bump deps
9+
310
### 0.2.0 - 2024-04-13
411

512
- fix: upgrade Vite configs

README.md

+1-15
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,10 @@ Easy and lightweight console logging for your JavaScript and TypeScript projects
1313

1414
## Installation
1515

16-
Pnpm
17-
1816
```sh
1917
pnpm add @slipmatio/logger
2018
```
2119

22-
Yarn
23-
24-
```sh
25-
yarn add @slipmatio/logger
26-
```
27-
28-
Npm
29-
30-
```sh
31-
npm install @slipmatio/logger
32-
```
33-
3420
## Basic Usage
3521

3622
The easiest way to use this logger is to use the `useLogger` or `useVueLogger` helpers. The helpers are configured to print only errors in production and print all but debug messages in development mode unless called with `debug=true`. You can also set the logger `name` attribute. Both arguments are optional:
@@ -59,7 +45,7 @@ Vue logger uses a special logger function that pretty prints ref, reactive, and
5945
import { ref, computed } from 'vue'
6046
import { useVueLogger } from '@slipmatio/logger'
6147

62-
const logger = useVueLogger('vuelogger', true)
48+
const logger = useVueLogger('vuelogger')
6349

6450
const num = ref(1)
6551
const timesTwo = computed(() => num.value * 2)

env.d.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// <reference types="vite/client" />
2+
3+
interface ImportMetaEnv {
4+
/**
5+
* Automatically read from package.json version field
6+
*/
7+
readonly VITE_APP_VERSION: string
8+
readonly VITE_APP_BUILD_EPOCH?: string
9+
}
10+
interface ImportMeta {
11+
readonly env: ImportMetaEnv
12+
}

package.json

+17-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@slipmatio/logger",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"type": "module",
55
"description": "Better console logging with TypScript support",
66
"main": "dist/index.cjs",
@@ -18,11 +18,13 @@
1818
"email": "[email protected]"
1919
},
2020
"scripts": {
21-
"build": "vite build",
22-
"dev": "vite",
23-
"test": "vitest --coverage",
24-
"test-e2e": "playwright test --ui",
25-
"test-e2e-ci": "playwright test"
21+
"dev": "DEBUG=0 vite",
22+
"build": "DEBUG=0 vue-tsc --build --force && vite build",
23+
"test": "DEBUG=0 vitest",
24+
"test:e2e": "DEBUG=0 playwright test --ui",
25+
"test:ci-e2e": "DEBUG=0 playwright test",
26+
"coverage": "DEBUG=0 vitest run --coverage",
27+
"type-check": "DEBUG=0 vue-tsc --build --force"
2628
},
2729
"files": [
2830
"dist",
@@ -41,15 +43,17 @@
4143
"license": "MIT",
4244
"devDependencies": {
4345
"@playwright/test": "1.48.2",
46+
"@tsconfig/node20": "^20.1.4",
4447
"@types/node": "22.9.0",
45-
"@vitejs/plugin-vue": "5.1.4",
46-
"@vitest/coverage-v8": "2.1.4",
48+
"@vitejs/plugin-vue": "5.2.0",
49+
"@vitest/coverage-v8": "2.1.5",
4750
"@vue/test-utils": "2.4.6",
48-
"happy-dom": "15.11.0",
51+
"@vue/tsconfig": "^0.6.0",
52+
"happy-dom": "15.11.6",
4953
"typescript": "5.6.3",
50-
"vite": "5.4.10",
54+
"vite": "5.4.11",
5155
"vite-plugin-dts": "4.3.0",
52-
"vitest": "2.1.4",
56+
"vitest": "2.1.5",
5357
"vue": "3.5.12",
5458
"vue-tsc": "2.1.10"
5559
},
@@ -62,7 +66,7 @@
6266
}
6367
},
6468
"engines": {
65-
"node": ">=18"
69+
"node": ">=22"
6670
},
6771
"repository": {
6872
"type": "git",
@@ -72,4 +76,4 @@
7276
"url": "https://github.com/slipmatio/logger/issues"
7377
},
7478
"homepage": "https://github.com/slipmatio/logger"
75-
}
79+
}

playwright.config.ts

+5-12
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const config: PlaywrightTestConfig = {
1111
*/
1212
timeout: 3000,
1313
},
14+
fullyParallel: true,
1415
/* Fail the build on CI if you accidentally left test.only in the source code. */
1516
forbidOnly: !!process.env.CI,
1617
/* Retry on CI only */
@@ -30,25 +31,17 @@ const config: PlaywrightTestConfig = {
3031
},
3132
projects: [
3233
{
33-
name: 'iPhone 6',
34+
name: 'iPhone SE',
3435
use: {
3536
browserName: 'webkit',
36-
...devices['iPhone 6'],
37-
},
38-
},
39-
{
40-
name: 'Macbook 11',
41-
use: {
42-
browserName: 'firefox',
43-
...devices['Macbook 11'],
44-
video: 'on-first-retry',
37+
...devices['iPhone SE'],
4538
},
4639
},
4740
{
4841
name: 'Desktop',
4942
use: {
50-
browserName: 'chromium',
51-
...devices['Macbook Pro'],
43+
browserName: 'firefox',
44+
...devices['Desktop Firefox'],
5245
},
5346
},
5447
],

0 commit comments

Comments
 (0)