Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to vite 5 #2812

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/whats-new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Target Release Date: Early 2024

- Tooling upgrades: Typescript 5.3, vite 5.0, docusauraus 3.0

**@loaders.gl/arrow**

- New [`GeoArrowLoader`](/docs/modules/arrow/api-reference/geoarrow-loader) supports loading [GeoArrow](/docs/modules/arrow/formats/geoarrow) files.
Expand Down
2 changes: 1 addition & 1 deletion examples/get-started/bundle-with-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
},
"devDependencies": {
"typescript": "^5.3.0",
"vite": "^4.4.9"
"vite": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/website/3d-tiles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
},
"devDependencies": {
"typescript": "^5.3.0",
"vite": "^4.4.9"
"vite": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions examples/website/geospatial/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {INITIAL_LOADER_NAME, INITIAL_EXAMPLE_NAME, INITIAL_MAP_STYLE, EXAMPLES}
import {Table, GeoJSON} from '@loaders.gl/schema';
import {Loader, load /* registerLoaders */} from '@loaders.gl/core';
import {GeoArrowLoader} from '@loaders.gl/arrow';
import {ParquetLoader, installBufferPolyfill} from '@loaders.gl/parquet';
import {GeoParquetLoader, installBufferPolyfill} from '@loaders.gl/parquet';
import {FlatGeobufLoader} from '@loaders.gl/flatgeobuf';
import {ShapefileLoader} from '@loaders.gl/shapefile';
import {KMLLoader, GPXLoader, TCXLoader} from '@loaders.gl/kml';
Expand All @@ -32,7 +32,7 @@ installBufferPolyfill();

const LOADERS: Loader[] = [
GeoArrowLoader,
ParquetLoader,
GeoParquetLoader,
FlatGeobufLoader,
// GeoPackageLoader
ShapefileLoader,
Expand Down
2 changes: 1 addition & 1 deletion examples/website/geospatial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
},
"devDependencies": {
"typescript": "^5.3.0",
"vite": "^4.4.9"
"vite": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/website/gltf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
},
"devDependencies": {
"typescript": "^5.3.0",
"vite": "^4.4.9"
"vite": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/website/i3s-arcgis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
},
"devDependencies": {
"typescript": "^5.3.0",
"vite": "^4.4.9"
"vite": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/website/i3s/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
},
"devDependencies": {
"typescript": "^5.3.0",
"vite": "^4.4.9"
"vite": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/website/pointcloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
},
"devDependencies": {
"typescript": "^5.3.0",
"vite": "^4.4.9"
"vite": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/website/textures/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
},
"devDependencies": {
"typescript": "^5.3.0",
"vite": "^4.4.9"
"vite": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/website/tiles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
},
"devDependencies": {
"typescript": "^5.3.0",
"vite": "^4.4.9"
"vite": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/website/wms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
},
"devDependencies": {
"typescript": "^5.0.0",
"vite": "^4.2.0"
"vite": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions modules/parquet/src/lib/parsers/parse-geoparquet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function parseGeoParquetFile(
file: ReadableFile,
options?: ParquetLoaderOptions
): Promise<ObjectRowTable | GeoJSONTable> {
const table = await parseParquetFile(file, options);
const table = await parseParquetFile(file, {...options, shape: 'object-row-table'});
const shape = options?.parquet?.shape;
return convertTable(table, shape);
}
Expand All @@ -28,7 +28,7 @@ export async function* parseGeoParquetFileInBatches(
file: ReadableFile,
options?: ParquetLoaderOptions
): AsyncIterable<ObjectRowTableBatch | GeoJSONTableBatch> {
const tableBatches = parseParquetFileInBatches(file, options);
const tableBatches = parseParquetFileInBatches(file, {...options, shape: 'object-row-table'});

for await (const batch of tableBatches) {
const shape = options?.parquet?.shape;
Expand Down
4 changes: 4 additions & 0 deletions modules/parquet/src/lib/parsers/parse-parquet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ function convertTable(
case 'object-row-table':
return objectRowTable;

// Hack until geoparquet fixes up forwarded shape
case 'geojson-table':
return objectRowTable;

default:
throw new Error(shape);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/parquet/src/parquet-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const GeoParquetLoader: LoaderWithParser<
> = {
...GeoParquetWorkerLoader,
parse(arrayBuffer: ArrayBuffer, options?: ParquetLoaderOptions) {
return parseParquetFile(new BlobFile(arrayBuffer), options);
return parseGeoParquetFile(new BlobFile(arrayBuffer), options);
},
parseFile: parseGeoParquetFile,
parseFileInBatches: parseGeoParquetFileInBatches
Expand Down
Loading