Skip to content

Commit d82f4df

Browse files
committed
v2.1.0
1 parent 18fd337 commit d82f4df

File tree

16 files changed

+2231
-1257
lines changed

16 files changed

+2231
-1257
lines changed

.eslintrc.cjs

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = defineConfig({
1212
es6: true,
1313
node: true,
1414
},
15+
reportUnusedDisableDirectives: true,
1516
extends: [
1617
'eslint:recommended',
1718
'plugin:@typescript-eslint/recommended',
@@ -21,36 +22,66 @@ module.exports = defineConfig({
2122
],
2223
parser: '@typescript-eslint/parser',
2324
parserOptions: {
24-
project: ['./tsconfig.lint.json'],
25+
project: ['./tsconfig.json'],
26+
sourceType: 'module',
2527
warnOnUnsupportedTypeScriptVersion: false,
2628
},
2729
plugins: ['@typescript-eslint', 'prettier', 'jsdoc', 'spellcheck'],
2830
rules: {
2931
curly: ['error'],
3032
'linebreak-style': ['error', 'unix'],
3133
'no-case-declarations': 'warn',
34+
'no-restricted-globals': [
35+
'error',
36+
{
37+
name: '__dirname',
38+
message: "Use `fileURLToPath(new URL('.', import.meta.url))` instead.",
39+
},
40+
],
3241
quotes: ['error', 'single', { avoidEscape: true }],
3342
semi: ['error', 'always'],
3443

35-
'@typescript-eslint/ban-ts-comment': 'off',
44+
'@typescript-eslint/array-type': [
45+
'warn',
46+
{ default: 'array-simple', readonly: 'generic' },
47+
],
48+
'@typescript-eslint/ban-ts-comment': [
49+
'error',
50+
{ 'ts-expect-error': 'allow-with-description' },
51+
],
52+
'@typescript-eslint/ban-types': 'warn',
53+
'@typescript-eslint/consistent-type-imports': 'error',
3654
'@typescript-eslint/explicit-function-return-type': [
3755
'error',
3856
{ allowExpressions: true },
3957
],
40-
'@typescript-eslint/interface-name-prefix': 'off',
41-
'@typescript-eslint/member-ordering': 'warn',
42-
'@typescript-eslint/consistent-type-imports': [
58+
'@typescript-eslint/explicit-member-accessibility': 'error',
59+
'@typescript-eslint/indent': [
4360
'error',
44-
{ prefer: 'type-imports', disallowTypeAnnotations: false },
61+
2,
62+
{
63+
SwitchCase: 1,
64+
ignoredNodes: ['MemberExpression', 'TSTypeParameterInstantiation'],
65+
},
4566
],
67+
'@typescript-eslint/lines-between-class-members': [
68+
'warn',
69+
'always',
70+
{ exceptAfterSingleLine: true },
71+
],
72+
'@typescript-eslint/member-ordering': 'warn',
4673
'@typescript-eslint/no-explicit-any': 'off',
4774
'@typescript-eslint/no-inferrable-types': 'off',
4875
'@typescript-eslint/no-parameter-properties': 'off',
76+
'@typescript-eslint/no-unsafe-argument': 'off',
4977
'@typescript-eslint/no-unsafe-assignment': 'off',
78+
'@typescript-eslint/no-unsafe-call': 'off',
5079
'@typescript-eslint/no-unused-vars': 'off',
5180
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
5281
'@typescript-eslint/prefer-optional-chain': 'warn',
53-
'@typescript-eslint/prefer-readonly': ['warn'],
82+
'@typescript-eslint/prefer-readonly': 'warn',
83+
'@typescript-eslint/prefer-reduce-type-parameter': 'warn',
84+
'@typescript-eslint/require-await': 'warn',
5485
'@typescript-eslint/restrict-template-expressions': 'off',
5586
'@typescript-eslint/typedef': [
5687
'warn',
@@ -90,6 +121,7 @@ module.exports = defineConfig({
90121
],
91122
'jsdoc/require-param-type': 'off',
92123
'jsdoc/require-returns-type': 'off',
124+
'jsdoc/tag-lines': 'off',
93125

94126
'spellcheck/spell-checker': [
95127
'warn',

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ assignees: ""
1010

1111
| Tool | Version |
1212
| ------ | ------------- |
13-
| Plugin | v1.x.x |
13+
| Plugin | v2.x.x |
1414
| Vue | v3.x.x |
1515
| Node | vx.x.x |
1616
| OS | win,linux,mac |

.github/workflows/ci.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest]
15-
node_version: [14, 16, 18]
15+
node_version: [16, 18, 20]
1616
include:
1717
- os: macos-latest
18-
node_version: 18
18+
node_version: 20
1919
- os: windows-latest
20-
node_version: 18
20+
node_version: 20
2121
fail-fast: false
2222

2323
name: 'Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
@@ -27,8 +27,6 @@ jobs:
2727

2828
- name: Install pnpm
2929
uses: pnpm/action-setup@v2
30-
with:
31-
version: 7
3230

3331
- name: Set node version to ${{ matrix.node_version }}
3432
uses: actions/setup-node@v3
@@ -55,21 +53,19 @@ jobs:
5553

5654
lint:
5755
runs-on: ubuntu-latest
58-
name: 'Lint: node-18, ubuntu-latest'
56+
name: 'Lint: node-20, ubuntu-latest'
5957
steps:
6058
- uses: actions/checkout@v3
6159
with:
6260
fetch-depth: 0
6361

6462
- name: Install pnpm
6563
uses: pnpm/action-setup@v2
66-
with:
67-
version: 7
6864

69-
- name: Set node version to 18
65+
- name: Set node version to 20
7066
uses: actions/setup-node@v3
7167
with:
72-
node-version: 18
68+
node-version: 20
7369
cache: 'pnpm'
7470

7571
- name: Prepare

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ build/Release
3737
# Dependency directories
3838
node_modules/
3939
jspm_packages/
40+
.pnpm-store/
4041

4142
# TypeScript v1 declaration files
4243
typings/

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.github/ISSUE_TEMPLATE/
22
.yarn/
3+
.pnpm-store/
34
.pnp.cjs
45
pnpm-lock.yaml
56
coverage/

.prettierrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @type {import('prettier').Options}
55
*/
66
module.exports = {
7-
plugins: [require.resolve('prettier-plugin-organize-imports')],
7+
plugins: ['prettier-plugin-organize-imports'],
88
singleQuote: true,
99
trailingComma: 'all',
1010
overrides: [

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Next
22

3-
[diff](https://github.com/gtm-support/vue-gtm/compare/2.0.0...main)
3+
[diff](https://github.com/gtm-support/vue-gtm/compare/2.1.0...main)
4+
5+
# 2.1.0
6+
7+
[diff](https://github.com/gtm-support/vue-gtm/compare/2.0.0...2.1.0)
8+
9+
- Fix peer dependency ranges ([#351])
10+
- Internal changes of the bundling process
11+
12+
[#351]: https://github.com/gtm-support/vue-gtm/issues/351
413

514
# 2.0.0
615

package.json

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
{
22
"name": "@gtm-support/vue-gtm",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Simple implementation of Google Tag Manager for Vue",
55
"scripts": {
6-
"clean": "rimraf coverage dist pnpm-lock.yaml node_modules",
7-
"build": "tsc --noEmit && vite build",
8-
"format": "prettier --write .",
9-
"lint": "eslint .",
6+
"clean": "rimraf coverage .eslintcache dist pnpm-lock.yaml node_modules",
7+
"build:clean": "rimraf dist",
8+
"build:code": "tsup-node",
9+
"build": "run-s build:clean build:code",
10+
"format": "prettier --cache --write .",
11+
"lint": "eslint --cache --cache-strategy content --report-unused-disable-directives .",
12+
"ts-check": "tsc",
1013
"test": "vitest",
11-
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build"
14+
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build",
15+
"preflight": "pnpm install && run-s format lint build test ts-check"
1216
},
1317
"type": "module",
1418
"files": [
1519
"dist"
1620
],
1721
"main": "dist/index.cjs",
1822
"module": "dist/index.js",
19-
"types": "dist/index.d.ts",
2023
"exports": {
2124
".": {
22-
"import": "./dist/index.js",
23-
"require": "./dist/index.cjs"
24-
}
25+
"require": "./dist/index.cjs",
26+
"default": "./dist/index.js"
27+
},
28+
"./package.json": "./package.json"
2529
},
2630
"author": {
2731
"name": "Christopher Quadflieg",
@@ -66,36 +70,36 @@
6670
"@gtm-support/core": "^2.0.0"
6771
},
6872
"devDependencies": {
69-
"@typescript-eslint/eslint-plugin": "~5.39.0",
70-
"@typescript-eslint/parser": "~5.39.0",
71-
"eslint": "~8.24.0",
72-
"eslint-config-prettier": "~8.5.0",
73-
"eslint-define-config": "~1.7.0",
73+
"@typescript-eslint/eslint-plugin": "~6.2.1",
74+
"@typescript-eslint/parser": "~6.2.1",
75+
"eslint": "~8.46.0",
76+
"eslint-config-prettier": "~8.9.0",
77+
"eslint-define-config": "~1.22.0",
7478
"eslint-gitignore": "~0.1.0",
75-
"eslint-plugin-jsdoc": "~39.3.6",
76-
"eslint-plugin-prettier": "~4.2.1",
77-
"eslint-plugin-spellcheck": "~0.0.19",
78-
"jsdom": "~20.0.1",
79-
"prettier": "2.7.1",
80-
"prettier-plugin-organize-imports": "~3.1.1",
81-
"rimraf": "~3.0.2",
82-
"typescript": "~4.8.4",
83-
"vite": "~3.1.6",
84-
"vite-plugin-dts": "~1.6.5",
85-
"vitest": "~0.23.4",
86-
"vue": "^3.2.40",
87-
"vue-router": "^4.1.5"
79+
"eslint-plugin-jsdoc": "~46.4.5",
80+
"eslint-plugin-prettier": "~5.0.0",
81+
"eslint-plugin-spellcheck": "~0.0.20",
82+
"jsdom": "~22.1.0",
83+
"npm-run-all": "~4.1.5",
84+
"prettier": "3.0.0",
85+
"prettier-plugin-organize-imports": "~3.2.3",
86+
"rimraf": "~5.0.1",
87+
"tsup": "~7.1.0",
88+
"typescript": "~5.1.6",
89+
"vitest": "~0.34.0",
90+
"vue": "^3.3.4",
91+
"vue-router": "^4.2.4"
8892
},
8993
"peerDependencies": {
90-
"vue": "^3.2.0"
94+
"vue": ">= 3.2.0 < 4.0.0"
9195
},
9296
"peerDependenciesMeta": {
9397
"vue-router": {
9498
"optional": true
9599
}
96100
},
97101
"optionalDependencies": {
98-
"vue-router": "^4.1.0"
102+
"vue-router": ">= 4.1.0 < 5.0.0"
99103
},
100-
"packageManager": "pnpm@7.13.2"
104+
"packageManager": "pnpm@8.6.11"
101105
}

0 commit comments

Comments
 (0)