Skip to content

Commit 64a7168

Browse files
committed
Merge branch 'release/2.7.0-alpha.1'
2 parents aee6f8e + 6d743e3 commit 64a7168

22 files changed

+2855
-1123
lines changed

.github/workflows/tests.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: npm run lint
3636

3737
unit:
38-
runs-on: macos-latest
38+
runs-on: ubuntu-latest
3939
steps:
4040
- uses: actions/checkout@v4
4141
- uses: actions/setup-node@v4
@@ -44,6 +44,8 @@ jobs:
4444
cache: npm
4545
- name: Install dependencies
4646
run: npm install
47+
- name: Install Playwright Dependencies
48+
run: npx playwright install chromium --with-deps
4749
- name: Run tests
4850
run: npm run test -- -- --retry=3 --coverage.enabled
4951
- name: Upload coverage to Codecov

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format
44

55
## [Unreleased]
66

7+
## [v2.7.0-alpha.1](https://github.com/studiometa/vue-mapbox-gl/compare/2.7.0-alpha.0...2.7.0-alpha.1) (2025-01-24)
8+
9+
### Fixed
10+
11+
- Fix Mapbox event binding ([#231](https://github.com/studiometa/vue-mapbox-gl/issues/231), [#232](https://github.com/studiometa/vue-mapbox-gl/pull/232), [882baca](https://github.com/studiometa/vue-mapbox-gl/commit/882baca))
12+
713
## [v2.7.0-alpha.0](https://github.com/studiometa/vue-mapbox-gl/compare/2.6.0...2.7.0-alpha.0) (2025-01-02)
814

915
### Added

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 🗺 Vue 3 Mapbox GL
1+
# 🗺 @studiometa/vue-mapbox-gl
22

33
[![NPM Version](https://img.shields.io/npm/v/@studiometa/vue-mapbox-gl.svg?style=flat&colorB=3e63dd&colorA=414853)](https://www.npmjs.com/package/@studiometa/vue-mapbox-gl/)
44
[![Downloads](https://img.shields.io/npm/dm/@studiometa/vue-mapbox-gl?style=flat&colorB=3e63dd&colorA=414853)](https://www.npmjs.com/package/@studiometa/vue-mapbox-gl/)

eslint.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export default defineConfig(
1111
...globals.browser,
1212
},
1313
},
14+
rules: {
15+
'vue/valid-define-emits': 'off',
16+
},
1417
},
1518
{
1619
ignores: ['**/.nuxt/**', '**/.output/**'],

package-lock.json

+2,785-1,090
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl-workspace",
33
"private": true,
4-
"version": "2.7.0-alpha.0",
4+
"version": "2.7.0-alpha.1",
55
"type": "module",
66
"workspaces": [
77
"packages/*"
@@ -24,14 +24,14 @@
2424
"devDependencies": {
2525
"@studiometa/eslint-config": "4.2.0",
2626
"@studiometa/prettier-config": "4.1.0",
27-
"eslint": "9.17.0",
27+
"eslint": "9.18.0",
2828
"prettier": "3.4.2"
2929
},
3030
"dependencies": {
3131
"@vitejs/plugin-vue": "5.2.1",
3232
"@vue/tsconfig": "0.7.0",
33-
"vite": "6.0.6",
34-
"vite-plugin-dts": "4.4.0",
33+
"vite": "6.0.9",
34+
"vite-plugin-dts": "4.5.0",
3535
"vue-tsc": "2.1.10"
3636
}
3737
}

packages/demo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl-demo",
3-
"version": "2.7.0-alpha.0",
3+
"version": "2.7.0-alpha.1",
44
"scripts": {
55
"dev": "nuxt dev",
66
"build": "nuxt build"

packages/docs/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"name": "@studiometa/vue-mapbox-gl-docs",
33
"private": true,
44
"type": "module",
5-
"version": "2.7.0-alpha.0",
5+
"version": "2.7.0-alpha.1",
66
"scripts": {
77
"dev": "vitepress",
88
"build": "vitepress build"
99
},
1010
"devDependencies": {
11-
"sass": "1.83.0",
11+
"sass": "1.83.4",
1212
"tailwindcss": "3.4.17",
1313
"vitepress": "1.5.0"
1414
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { describe, it, expect } from 'vitest';
2+
import { render } from 'vitest-browser-vue';
3+
import { MapboxMap } from '@studiometa/vue-mapbox-gl';
4+
import 'mapbox-gl/dist/mapbox-gl.css';
5+
6+
describe('The MapboxMap component', () => {
7+
it('should display a map', async () => {
8+
const { emitted, getByTestId } = render(MapboxMap, {
9+
props: {
10+
accessToken:
11+
'pk.eyJ1IjoiYWdlbmNlc3R1ZGlvbWV0YSIsImEiOiJjanh5ZW81aHEwOHV3M2lwZzhhNW1vdXl5In0.3hbV2QKVzZWf511JK9xCug',
12+
mapStyle: 'mapbox://styles/mapbox/streets-v11',
13+
},
14+
attrs: {
15+
'data-testid': 'map',
16+
style: {
17+
height: '100vh',
18+
},
19+
},
20+
});
21+
22+
await expect.element(getByTestId('map')).toBeVisible();
23+
expect(emitted('mb-created')).toBeDefined();
24+
});
25+
});

packages/tests/index.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ import * as pkg from '@studiometa/vue-mapbox-gl';
33

44
describe('The package', () => {
55
it('should export all components', () => {
6-
expect(Object.keys(pkg)).toMatchInlineSnapshot(`
6+
expect(Object.keys(pkg).sort()).toMatchInlineSnapshot(`
77
[
8-
"StoreLocator",
9-
"VueScroller",
108
"MapboxCluster",
9+
"MapboxFullscreenControl",
1110
"MapboxGeocoder",
1211
"MapboxGeolocateControl",
1312
"MapboxImage",
@@ -18,7 +17,8 @@ describe('The package', () => {
1817
"MapboxNavigationControl",
1918
"MapboxPopup",
2019
"MapboxSource",
21-
"MapboxFullscreenControl",
20+
"StoreLocator",
21+
"VueScroller",
2222
"useControl",
2323
"useEventsBinding",
2424
"useMap",

packages/tests/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl-tests",
3-
"version": "2.7.0-alpha.0",
3+
"version": "2.7.0-alpha.1",
44
"type": "module",
55
"scripts": {
66
"test": "vitest"
@@ -9,11 +9,12 @@
99
"@mapbox/mapbox-gl-geocoder": "^5.0.3",
1010
"@studiometa/vue-mapbox-gl": "*",
1111
"@vitejs/plugin-vue": "5.2.1",
12+
"@vitest/browser": "2.1.8",
13+
"@vitest/coverage-v8": "2.1.8",
1214
"mapbox-gl": "^3.9.1",
15+
"playwright": "1.49.1",
1316
"vitest": "2.1.8",
17+
"vitest-browser-vue": "0.1.0",
1418
"vue": "^3.5.13"
15-
},
16-
"devDependencies": {
17-
"@vitest/coverage-v8": "2.1.8"
1819
}
1920
}

packages/tests/vitest.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@ export default defineConfig({
1212
provider: 'v8',
1313
include: ['vue-mapbox-gl/**'],
1414
},
15+
browser: {
16+
provider: 'playwright', // or 'webdriverio'
17+
enabled: true,
18+
name: 'chromium', // browser name is required
19+
},
1520
},
1621
});

packages/vue-mapbox-gl/components/MapboxCluster.vue

+1-6
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,7 @@
130130
import MapboxSource from './MapboxSource.vue';
131131
132132
const props = defineProps(propsConfig);
133-
const emit = defineEmits([
134-
'mb-cluster-click',
135-
'mb-feature-click',
136-
'mb-feature-mouseenter',
137-
'mb-feature-mouseleave',
138-
]);
133+
const emit = defineEmits();
139134
140135
const { map } = useMap();
141136
const id = ref(`mb-cluster-${index}`);

packages/vue-mapbox-gl/components/MapboxGeocoder.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
import { useControl } from '../composables/index.js';
137137
138138
const props = defineProps(propsConfig);
139-
const emit = defineEmits(events.map((event) => `mb-${event}`));
139+
const emit = defineEmits();
140140
141141
const root = ref();
142142
const options = computed(() => {

packages/vue-mapbox-gl/components/MapboxGeolocateControl.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
import { useControl } from '../composables/index.js';
6868
6969
const props = defineProps(propsConfig);
70-
const emit = defineEmits(events.map((event) => `mb-${event}`));
70+
const emit = defineEmits();
7171
7272
const { control } = useControl(GeolocateControl, { propsConfig, events, props, emit });
7373

packages/vue-mapbox-gl/components/MapboxImage.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import { useMap } from '../composables/index.js';
4848
4949
const props = defineProps(propsConfig);
50-
const emit = defineEmits(['mb-add']);
50+
const emit = defineEmits();
5151
5252
const { map } = useMap();
5353
const isReady = ref(false);

packages/vue-mapbox-gl/components/MapboxImages.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
required: true,
2626
},
2727
});
28-
const emit = defineEmits(['mb-add', 'mb-ready']);
28+
const emit = defineEmits();
2929
3030
const isReady = ref(false);
3131
const addedImages = new Map();

packages/vue-mapbox-gl/components/MapboxLayer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
import { useEventsBinding, useMap } from '../composables/index.js';
6262
6363
const props = defineProps(propsConfig);
64-
const emit = defineEmits(events.map((event) => `mb-${event}`));
64+
const emit = defineEmits();
6565
6666
const { map } = useMap();
6767
const options = computed(() => {

packages/vue-mapbox-gl/components/MapboxMap.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304
import { useEventsBinding, usePropsBinding } from '../composables/index.js';
305305
306306
const props = defineProps(propsConfig);
307-
const emit = defineEmits(events.map((event) => `mb-${event}`));
307+
const emit = defineEmits();
308308
309309
const map = shallowRef<Map>(null);
310310
provide('mapbox-map', map);

packages/vue-mapbox-gl/components/MapboxMarker.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
import MapboxPopup from './MapboxPopup.vue';
9393
9494
const props = defineProps(propsConfig);
95-
const emit = defineEmits(events.map((event) => `mb-${event}`));
95+
const emit = defineEmits();
9696
const slots = useSlots();
9797
9898
const marker = shallowRef();

packages/vue-mapbox-gl/components/MapboxPopup.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
import { useMap, usePropsBinding, useEventsBinding } from '../composables/index.js';
7474
7575
const props = defineProps(propsConfig);
76-
const emit = defineEmits(['mb-open', 'mb-close']);
76+
const emit = defineEmits();
7777
7878
const popup = shallowRef();
7979
const root = ref();

packages/vue-mapbox-gl/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl",
3-
"version": "2.7.0-alpha.0",
3+
"version": "2.7.0-alpha.1",
44
"description": "A small components library to use Mapbox GL in Vue 3.",
55
"homepage": "https://github.com/studiometa/vue-mapbox-gl#readme",
66
"bugs": {
@@ -43,7 +43,7 @@
4343
"devDependencies": {
4444
"@mapbox/mapbox-gl-geocoder": "5.0.3",
4545
"@studiometa/js-toolkit": "2.12.1",
46-
"mapbox-gl": "3.9.1",
46+
"mapbox-gl": "3.9.3",
4747
"vue": "3.5.13"
4848
},
4949
"peerDependencies": {

0 commit comments

Comments
 (0)