Skip to content

Commit 66b07b8

Browse files
committed
feat: update module to support Nuxt 3.x
BREAKING CHANGE: The module now requires Nuxt version 3.x
1 parent e51ac1f commit 66b07b8

36 files changed

+6339
-9582
lines changed
File renamed without changes.

.cz-config.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
module.exports = {
2+
types: [
3+
{ value: 'feat', name: '✨ feat: A new feature' },
4+
{ value: 'fix', name: '🐛 fix: A bug fix' },
5+
{ value: 'docs', name: '📚 docs: Documentation only changes' },
6+
{
7+
value: 'style',
8+
name: '🎨 style: Changes that do not affect the meaning of the code\n(white-space, formatting, missing semi-colons, etc)'
9+
},
10+
{
11+
value: 'refactor',
12+
name: '♻️ refactor: A code change that neither fixes a bug nor adds a feature'
13+
},
14+
{
15+
value: 'perf',
16+
name: '🚀 perf: A code change that improves performance'
17+
},
18+
{
19+
value: 'test',
20+
name: '✅ test: Adding missing tests or stories (example scopes: Cypress, Storybook)'
21+
},
22+
{
23+
value: 'build',
24+
name: '🛠 build: Changes that affect the build system or external dependencies (example scopes: Vite, npm, Hygen)'
25+
},
26+
{
27+
value: 'ci',
28+
name: '⚙️ ci: Changes to our CI configuration files and scripts (example scopes: GitHub Actions, Cypress, Storybook)'
29+
},
30+
{
31+
value: 'chore',
32+
name: '👷 chore: Changes to the build process or auxiliary tools\nand libraries such as documentation generation'
33+
},
34+
{ value: 'revert', name: '🗑 revert: Reverts a previous commit' }
35+
],
36+
37+
// override the messages, defaults are as follows
38+
messages: {
39+
type: "Select the type of change that you're committing:",
40+
scope: '\nDenote the SCOPE of this change (optional):',
41+
// used if allowCustomScopes is true
42+
// customScope: 'Denote the SCOPE of this change:',
43+
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
44+
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
45+
breaking: 'List any BREAKING CHANGES (optional):\n',
46+
footer:
47+
'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n',
48+
confirmCommit: 'Are you sure you want to proceed with the commit above?'
49+
},
50+
allowCustomScopes: false,
51+
allowBreakingChanges: ['feat', 'fix']
52+
}

.eslintignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
# Common
22
node_modules
33
dist
4-
.nuxt
54
coverage
6-
7-
# Plugin
8-
lib/plugin.js
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
module.exports = {
22
root: true,
3-
parserOptions: {
4-
parser: 'babel-eslint',
5-
sourceType: 'module'
6-
},
7-
extends: ['@nuxtjs', 'plugin:prettier-vue/recommended', 'prettier'],
3+
extends: [
4+
'eslint:recommended',
5+
'@nuxtjs/eslint-config-typescript',
6+
'plugin:prettier-vue/recommended',
7+
'plugin:prettier/recommended',
8+
],
89
plugins: ['prettier'],
910
rules: {
1011
'prettier/prettier': ['error'],
1112
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
1213
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
13-
'no-unused-vars': process.env.NODE_ENV === 'production' ? 'error' : 'warn'
14-
}
14+
'no-unused-vars': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
15+
'@typescript-eslint/no-unused-vars': [
16+
process.env.NODE_ENV === 'production' ? 'error' : 'off',
17+
],
18+
},
1519
}

.github/workflows/ci.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
1-
name: ci
1+
name: Tests
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
4+
- workflow_dispatch
5+
- push
6+
- pull_request
107

118
jobs:
129
ci:
10+
if: "!contains(github.event.head_commit.message, 'skip ci')"
1311
runs-on: ${{ matrix.os }}
14-
1512
strategy:
1613
matrix:
17-
os: [ubuntu-latest, macos-latest, windows-latest]
18-
node: [14, 16]
14+
os: [ubuntu-latest]
15+
node: [14, 16, 18]
1916

2017
steps:
18+
- name: checkout
19+
uses: actions/checkout@v3
20+
2121
- uses: actions/setup-node@v3
2222
with:
2323
node-version: ${{ matrix.node }}
2424

25-
- name: checkout
26-
uses: actions/checkout@master
27-
2825
- name: cache node_modules
2926
uses: actions/cache@v3
3027
with:
@@ -35,11 +32,11 @@ jobs:
3532
if: steps.cache.outputs.cache-hit != 'true'
3633
run: yarn
3734

38-
- name: Lint
39-
run: yarn lint
40-
4135
- name: Test
4236
run: yarn test
4337

44-
- name: Coverage
38+
- name: Upload coverage to Codecov
39+
if: github.actor != 'dependabot[bot]'
4540
uses: codecov/codecov-action@v3
41+
with:
42+
file: ./coverage/lcov.info

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
if: "!contains(github.event.head_commit.message, 'skip release')"
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
token: ${{ secrets.SEMANTIC_RELEASE_GH_TOKEN }}
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 16
24+
25+
- name: Install dependencies
26+
run: yarn install
27+
28+
- name: Release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GH_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}
32+
run: yarn semantic-release

.gitignore

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,56 @@
1+
# Dependencies
12
node_modules
2-
*.iml
3-
.idea
3+
4+
# Logs
45
*.log*
6+
7+
# Temp directories
8+
.temp
9+
.tmp
10+
.cache
11+
12+
# Yarn
13+
**/.yarn/cache
14+
**/.yarn/*state*
15+
16+
# Generated dirs
17+
dist
18+
19+
# Nuxt
520
.nuxt
6-
.vscode
7-
.DS_Store
21+
.output
22+
.vercel_build_output
23+
.build-*
24+
.env
25+
.netlify
26+
27+
# Env
28+
.env
29+
30+
# Testing
31+
reports
832
coverage
9-
dist
33+
*.lcov
34+
.nyc_output
35+
36+
# VSCode
37+
.vscode/*
38+
!.vscode/settings.json
39+
!.vscode/tasks.json
40+
!.vscode/launch.json
41+
!.vscode/extensions.json
42+
!.vscode/*.code-snippets
43+
44+
# Intellij idea
45+
*.iml
46+
.idea
47+
48+
# OSX
49+
.DS_Store
50+
.AppleDouble
51+
.LSOverride
52+
.AppleDB
53+
.AppleDesktop
54+
Network Trash Folder
55+
Temporary Items
56+
.apdisk

.markdownlint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
default: true
2+
3+
# ===
4+
# Rule customizations for markdownlint go here
5+
# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md
6+
# ===
7+
8+
# Disable line length restrictions, because editor soft-wrapping is being
9+
# used instead.
10+
line-length: false
11+
12+
# Allow the `Meta` MDX component.
13+
no-inline-html:
14+
allowed_elements:
15+
- 'Meta'
16+
17+
# Don't require the first element to be a heading tag.
18+
first-line-heading: false
19+
20+
# ===
21+
# Prettier overrides
22+
# ===
23+
24+
no-multiple-blanks: false
25+
list-marker-space: false

.nuxtrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
imports.autoImport=false
2+
typescript.includeWorkspace=true

.prettierignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ node_modules
33
dist
44
.nuxt
55
coverage
6-
7-
# Plugin
8-
lib/plugin.js
6+
.nvmrc
7+
CHANGELOG.md

0 commit comments

Comments
 (0)