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

Publint fixes #15

Merged
merged 8 commits into from Jan 31, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x, 20.x, 21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -26,7 +26,9 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn
run: |
yarn
yarn build

- name: Run tests
run: yarn test-fast
run: yarn test
25 changes: 15 additions & 10 deletions package.json
@@ -1,32 +1,37 @@
{
"name": "quadbin",
"version": "0.1.9",
"version": "0.2.0",
"description": "Utility functions for working with Quadbins",
"license": "MIT",
"main": "dist/cjs/index.js",
"type": "module",
felixpalmer marked this conversation as resolved.
Show resolved Hide resolved
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js",
"umd:main": "dist/umd/index.js",
"types": "dist/types/index.d.js",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts"
"require": "./dist/cjs/index.cjs"
},
"./*": "./*"
},
"keywords": ["quadbin", "webgl", "visualization"],
"keywords": [
"quadbin",
"webgl",
"visualization"
],
"repository": {
"type": "git",
"url": "https://github.com/CartoDB/quadbin-js.git"
},
"scripts": {
"clean": "rm -r dist/*",
"clean": "rm -rf dist/*",
"build": "yarn clean && yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd",
"build:cjs": "tsc -p tsconfig/tsconfig.cjs.json",
"build:cjs": "tsc -p tsconfig/tsconfig.cjs.json && mv dist/cjs/index.js dist/cjs/index.cjs",
"build:esm": "tsc -p tsconfig/tsconfig.esm.json",
"build:types": "tsc -p tsconfig/tsconfig.types.json",
"build:umd": "webpack --config tsconfig/webpack.config.js",
"build:umd": "webpack --config tsconfig/webpack.config.cjs",
"lint": "npx prettier --check src",
"test": "yarn lint && yarn test-fast",
"test-fast": "npx ts-node node_modules/tape/bin/tape test/**/*.spec.js"
Expand All @@ -39,7 +44,7 @@
"babel-loader": "^8.0.0",
"babel-preset-minify": "^0.5.0",
"prettier": "^2.4.1",
"tape": "^4.11.0",
"tape": "^5.3.0",
"ts-loader": "^9.2.5",
"typescript": "^4.4.4",
"webpack": "^5.52.1",
Expand Down
19 changes: 10 additions & 9 deletions test/index.spec.js
Expand Up @@ -6,8 +6,9 @@ import {
geometryToCells,
getResolution,
hexToBigInt
} from '../src/index';
import {tileToQuadkey} from './quadkey-utils';
} from 'quadbin';

import {tileToQuadkey} from './quadkey-utils.js';

const TEST_TILES = [
{x: 0, y: 0, z: 0, q: 5192650370358181887n},
Expand Down Expand Up @@ -47,13 +48,13 @@ test('Quadbin getParent', async t => {
});

// Zoom:26 test not agreeing with Python
import PointGeometry from './data/PointGeometry.json';
import MultiPointGeometry from './data/MultiPointGeometry.json';
import LineStringGeometry from './data/LineStringGeometry.json';
import MultiLineStringGeometry from './data/MultiLineStringGeometry.json';
import PolygonGeometry from './data/PolygonGeometry.json';
import PolygonAntimeridianGeometry from './data/PolygonAntimeridianGeometry.json';
import MultiPolygonGeometry from './data/MultiPolygonGeometry.json';
import PointGeometry from './data/PointGeometry.json' assert {type: 'json'};
import MultiPointGeometry from './data/MultiPointGeometry.json' assert {type: 'json'};
import LineStringGeometry from './data/LineStringGeometry.json' assert {type: 'json'};
import MultiLineStringGeometry from './data/MultiLineStringGeometry.json' assert {type: 'json'};
import PolygonGeometry from './data/PolygonGeometry.json' assert {type: 'json'};
import PolygonAntimeridianGeometry from './data/PolygonAntimeridianGeometry.json' assert {type: 'json'};
import MultiPolygonGeometry from './data/MultiPolygonGeometry.json' assert {type: 'json'};
const testCases = [
PointGeometry,
MultiPointGeometry,
Expand Down
13 changes: 5 additions & 8 deletions tsconfig.json
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"target": "es2020",
"jsx": "react",
"target": "es2022",
"strict": true,
"noImplicitAny": false,
"allowJs": true,
Expand All @@ -14,12 +13,10 @@
"skipLibCheck": true,
"baseUrl": ".",
"paths": {
"test": ["test"]
"test": ["test"],
"quadbin": ["src"]
}
},
"include": [
"src"
],
"exclude": [
]
"include": ["src"],
"exclude": []
}
File renamed without changes.