Skip to content

Commit

Permalink
Merge pull request #39 from artmizu/feat/nuxt-3.11.2-update
Browse files Browse the repository at this point in the history
Update dependencies, resolve some issues around types, Node 20+ support
  • Loading branch information
artmizu authored May 13, 2024
2 parents 9c8949b + 0f69119 commit e5a3c2f
Show file tree
Hide file tree
Showing 20 changed files with 5,594 additions and 3,322 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
cache: pnpm

- name: Install dependencies
run: pnpm install --shamefully-hoist
run: pnpm install

- name: Prepare is needed, because it generate types
run: pnpm dev:prepare
Expand All @@ -35,16 +35,16 @@ jobs:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
cache: pnpm

- name: Install dependencies
run: pnpm install --shamefully-hoist
run: pnpm install

- name: Prepare is needed, because it generate types
run: pnpm dev:prepare
Expand All @@ -58,17 +58,17 @@ jobs:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
cache: pnpm

- name: Install dependencies
run: |
pnpm install --shamefully-hoist
pnpm install
npx playwright install
- name: Prepare is needed, because it generate types
Expand All @@ -78,4 +78,4 @@ jobs:
run: pnpm vitest run

- name: Run type tests
run: pnpm vitest typecheck --run
run: pnpm vitest --typecheck.only --typecheck.ignoreSourceErrors
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
if: ${{ steps.release.outputs.release_created }}

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
if: ${{ steps.release.outputs.release_created }}

- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
cache: pnpm
if: ${{ steps.release.outputs.release_created }}
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
1 change: 1 addition & 0 deletions .nuxtrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
imports.autoImport=false
typescript.includeWorkspace=true
45 changes: 26 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@artmizu/nuxt-prometheus",
"type": "module",
"version": "2.2.1",
"packageManager": "pnpm@7.16.1",
"packageManager": "pnpm@9.1.1",
"description": "Allows you to better understand what's going on with your application and how to optimize performance and other things in production",
"license": "MIT",
"repository": "artmizu/nuxt-prometheus",
Expand All @@ -11,49 +11,56 @@
},
"exports": {
".": {
"require": "./dist/module.cjs",
"import": "./dist/module.mjs"
"types": "./dist/types.d.mts",
"default": "./dist/module.mjs"
}
},
"main": "./dist/module.cjs",
"main": "./dist/module.mjs",
"types": "./dist/types.d.ts",
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./*"
]
}
},
"files": [
"dist"
],
"engines": {
"node": "<=17"
},
"scripts": {
"prepack": "nuxt-module-build",
"prepack": "nuxt-module-build build",
"dev": "nuxi dev playground",
"dev:build": "nuxi build playground",
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
"dev:prepare": "nuxt-module-build prepare && nuxt-module-build build && nuxi prepare playground",
"test": "vitest",
"test:type": "vitest typecheck",
"test:type": "vitest --typecheck.only --typecheck.ignoreSourceErrors",
"lint": "eslint .",
"typecheck": "tsc --noEmit",
"prepare": "husky install"
},
"dependencies": {
"@mswjs/interceptors": "^0.19.2",
"@nuxt/kit": "^3.6.5",
"@mswjs/interceptors": "^0.28.4",
"@nuxt/kit": "^3.11.2",
"consola": "^3.2.3",
"defu": "^6.1.2",
"h3": "^1.7.1",
"prom-client": "^14.2.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.30.1",
"@nuxt/module-builder": "^0.2.1",
"@nuxt/schema": "^3.6.5",
"@nuxt/test-utils": "3.0.0",
"@nuxt/module-builder": "^0.6.0",
"@nuxt/schema": "^3.11.2",
"@nuxt/test-utils": "^3.12.1",
"@types/node": "^18.11.15",
"@vue/test-utils": "^2.4.6",
"eslint": "^8.29.0",
"happy-dom": "^14.10.1",
"husky": "^8.0.2",
"nuxt": "^3.6.5",
"playwright": "^1.28.1",
"typescript": "4.8.4",
"vitest": "^0.34.3",
"nuxt": "^3.11.2",
"playwright-core": "^1.44.0",
"typescript": "^5.4.5",
"vitest": "^1.6.0",
"vue": "^3.3.4",
"vue-router": "^4.2.4"
}
Expand Down
3 changes: 3 additions & 0 deletions playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<NuxtLink to="/b">
To B
</NuxtLink>
<NuxtLink to="/c">
To C
</NuxtLink>
<NuxtPage />
</div>
</template>
5 changes: 1 addition & 4 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { defineNuxtConfig } from 'nuxt/config'
import MyModule from '../'

export default defineNuxtConfig({
modules: [
MyModule,
'@artmizu/nuxt-prometheus',
],

prometheus: {
Expand Down
9 changes: 8 additions & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"name": "nuxt-yandex-metrika-playground-nuxt-2",
"private": true
"private": true,
"dependencies": {
"@artmizu/nuxt-prometheus": "workspace:^",
"nuxt": "latest"
},
"devDependencies": {
"typescript": "^5.4.5"
}
}
13 changes: 13 additions & 0 deletions playground/pages/c.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script setup lang="ts">
const response = await fetch('https://jsonplaceholder.typicode.com/todos')
const data = await response.json()
</script>

<template>
<div>
bbb
<div id="response">
{{ data }}
</div>
</div>
</template>
9 changes: 9 additions & 0 deletions playground/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./.nuxt/tsconfig.json",
"exclude": [
"dist",
"node_modules",
"playground",
"../src"
]
}
Loading

0 comments on commit e5a3c2f

Please sign in to comment.