Skip to content

Commit

Permalink
chore: upgrade vite 5.x 🤷‍♂️
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
  • Loading branch information
vinayakkulkarni committed Feb 5, 2024
1 parent 062d449 commit 646ec36
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 49 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"types": "./dist/index.d.ts",
"type": "module",
"scripts": {
"build": "rimraf dist && vite build && vue-tsc --declaration --emitDeclarationOnly && prettier --write dist/**/*.ts",
"build": "rimraf dist && vite build && vue-tsc --declaration --emitDeclarationOnly && prettier --write ./dist/*{cjs,js,ts}",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"docs:dev": "vitepress dev docs",
Expand Down
8 changes: 4 additions & 4 deletions src/controls/attribution/VControlAttribution.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<script setup lang="ts">
import type { AttributionOptions, ControlPosition } from './types';
import type { ControlPosition, AttributionControlOptions } from './types';
import { AttributionControl } from 'maplibre-gl';
import { onMounted } from 'vue';
import { useSlots, onMounted } from 'vue';
import { MapKey, injectStrict } from '../../utils';
const defaultOptions: AttributionOptions = {
const defaultOptions: AttributionControlOptions = {
compact: false,
customAttribution: undefined,
};
const props = withDefaults(
defineProps<{
options?: AttributionOptions;
options?: AttributionControlOptions;
position?: ControlPosition;
}>(),
{
Expand Down
2 changes: 1 addition & 1 deletion src/controls/attribution/types.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type { AttributionOptions, ControlPosition } from 'maplibre-gl';
export type { ControlPosition, AttributionControlOptions } from 'maplibre-gl';
6 changes: 3 additions & 3 deletions src/controls/fullscreen/VControlFullscreen.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script setup lang="ts">
import type { ControlPosition, FullscreenOptions } from './types';
import type { ControlPosition, FullscreenControlOptions } from './types';
import { FullscreenControl } from 'maplibre-gl';
import { onMounted } from 'vue';
import { MapKey, injectStrict } from '../../utils';
const defaultOptions: FullscreenOptions = {
const defaultOptions: FullscreenControlOptions = {
container: undefined,
};
const props = withDefaults(
defineProps<{
options?: FullscreenOptions;
options?: FullscreenControlOptions;
position?: ControlPosition;
}>(),
{
Expand Down
2 changes: 1 addition & 1 deletion src/controls/fullscreen/types.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type { ControlPosition, FullscreenOptions } from 'maplibre-gl';
export type { ControlPosition, FullscreenControlOptions } from 'maplibre-gl';
6 changes: 3 additions & 3 deletions src/controls/geolocate/VControlGeolocate.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script setup lang="ts">
import type { ControlPosition, GeolocateOptions } from './types';
import type { ControlPosition, GeolocateControlOptions } from './types';
import { GeolocateControl } from 'maplibre-gl';
import { onMounted } from 'vue';
import { geolocateControlEvents as events } from './events';
import { MapKey, injectStrict } from '../../utils';
const defaultOptions: GeolocateOptions = {
const defaultOptions: GeolocateControlOptions = {
fitBoundsOptions: {
linear: false,
offset: [0, 0],
Expand All @@ -23,7 +23,7 @@
const props = withDefaults(
defineProps<{
options?: GeolocateOptions;
options?: GeolocateControlOptions;
position?: ControlPosition;
}>(),
{
Expand Down
2 changes: 1 addition & 1 deletion src/controls/geolocate/types.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type { ControlPosition, GeolocateOptions } from 'maplibre-gl';
export type { ControlPosition, GeolocateControlOptions } from 'maplibre-gl';
6 changes: 3 additions & 3 deletions src/controls/navigation/VControlNavigation.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<script setup lang="ts">
import type { ControlPosition, NavigationOptions } from './types';
import type { ControlPosition, NavigationControlOptions } from './types';
import { NavigationControl } from 'maplibre-gl';
import { onMounted, inject } from 'vue';
import { MapKey } from '../../utils';
const defaultOptions: NavigationOptions = {
const defaultOptions: NavigationControlOptions = {
showCompass: true,
showZoom: true,
visualizePitch: true,
};
const props = withDefaults(
defineProps<{
options?: NavigationOptions;
options?: NavigationControlOptions;
position?: ControlPosition;
}>(),
{
Expand Down
2 changes: 1 addition & 1 deletion src/controls/navigation/types.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type { ControlPosition, NavigationOptions } from 'maplibre-gl';
export type { ControlPosition, NavigationControlOptions } from 'maplibre-gl';
6 changes: 3 additions & 3 deletions src/controls/scale/VControlScale.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<script setup lang="ts">
import type { ControlPosition, ScaleOptions } from './types';
import type { ControlPosition, ScaleControlOptions } from './types';
import { onMounted, inject } from 'vue';
import { ScaleControl } from 'maplibre-gl';
import { MapKey } from '../../utils';
const defaultOptions: ScaleOptions = {
const defaultOptions: ScaleControlOptions = {
maxWidth: 100,
unit: 'metric',
};
const props = withDefaults(
defineProps<{
options?: ScaleOptions;
options?: ScaleControlOptions;
position?: ControlPosition;
}>(),
{
Expand Down
2 changes: 1 addition & 1 deletion src/controls/scale/types.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type { ControlPosition, ScaleOptions } from 'maplibre-gl';
export type { ControlPosition, ScaleControlOptions } from 'maplibre-gl';
4 changes: 3 additions & 1 deletion src/map/VMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import type { MapOptions, MapEventType } from 'maplibre-gl';
import type { Ref } from 'vue';
import { Map } from 'maplibre-gl';
import { defineComponent, onMounted, provide, ref, shallowRef } from 'vue';
import { onMounted, provide, ref, shallowRef } from 'vue';
import { mapEvents } from '../constants/events';
import { MapKey } from '../utils/symbols';
Expand All @@ -11,9 +11,11 @@
options: MapOptions;
}>(),
{
// @ts-ignore
options: { container: 'map' },
},
);
const emit = defineEmits(['loaded', ...mapEvents]);
let map: Ref<Map> = shallowRef({} as Map);
Expand Down
34 changes: 9 additions & 25 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"lib": [
"esnext",
"esnext.asynciterable",
"dom"
],
"moduleResolution": "bundler",
"skipLibCheck": true,
"lib": ["esnext", "esnext.asynciterable", "dom"],
"jsx": "preserve",
"outDir": "./dist",
"rootDir": "./src",
Expand All @@ -20,24 +17,11 @@
"experimentalDecorators": true,
"baseUrl": ".",
"paths": {
"~/*": [
"./*"
],
"@/*": [
"./*"
]
"~/*": ["./*"],
"@/*": ["./*"]
},
"types": [
"@types/node",
"vitest/globals"
]
"types": ["@types/node", "vitest/globals"]
},
"include": [
"src"
],
"exclude": [
"node_modules",
"dist",
"docs"
]
}
"include": ["src"],
"exclude": ["node_modules", "dist", "docs"]
}
1 change: 0 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export default defineConfig({
exports: 'named',
banner,
strict: true,
sourcemap: true,
globals: {
vue: 'vue',
'maplibre-gl': 'maplibreGl',
Expand Down

0 comments on commit 646ec36

Please sign in to comment.