Skip to content

Commit

Permalink
Replace TSDX with DTS
Browse files Browse the repository at this point in the history
DTS is a fork of TSDX that is under active development and support multiple entry points
  • Loading branch information
abkfenris committed Apr 22, 2022
1 parent d4f7f12 commit c585031
Show file tree
Hide file tree
Showing 10 changed files with 5,680 additions and 9,001 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
rules: {
'prettier/prettier': [
'warn',
{
endOfLine: 'auto',
},
],
},
}
14,606 changes: 5,654 additions & 8,952 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,25 @@
"node": ">=10"
},
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test",
"lint": "tsdx lint",
"prepare": "tsdx build",
"start": "dts watch --entry src/index.ts --entry src/extensions/*.ts",
"build": "dts build --entry src/index.ts --entry src/extensions/*.ts",
"test": "dts test",
"lint": "dts lint",
"prepare": "dts build --entry src/index.ts --entry src/extensions/*.ts",
"size": "size-limit",
"analyze": "size-limit --why"
},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
"pre-commit": "dts lint"
}
},
"prettier": {
"printWidth": 80,
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "es5",
"arrowParens": "always"
},
"name": "@gulfofmaine/tsstac",
"author": "Alex Kerney",
Expand All @@ -50,10 +51,10 @@
"devDependencies": {
"@size-limit/preset-small-lib": "^7.0.8",
"@types/geojson": "^7946.0.8",
"dts-cli": "^1.5.1",
"husky": "^7.0.4",
"jest-fetch-mock": "^3.0.3",
"size-limit": "^7.0.8",
"tsdx": "^0.14.1",
"tslib": "^2.3.1",
"typescript": "^4.6.3"
},
Expand Down
2 changes: 1 addition & 1 deletion src/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Catalog extends CatalogCollectionCommon implements ICatalog {
this.id = id
this.title = title
this.description = description
this.links = links.map(l => new Link(l))
this.links = links.map((l) => new Link(l))
this.store = store
this.self_href = self_href
this.root = root
Expand Down
2 changes: 1 addition & 1 deletion src/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class Collection extends CatalogCollectionCommon implements ICollection {
this.id = id
this.title = title
this.description = description
this.links = links.map(l => new Link(l))
this.links = links.map((l) => new Link(l))
this.store = store
this.self_href = self_href
this.keywords = keywords ?? []
Expand Down
2 changes: 1 addition & 1 deletion src/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class Item extends STACObject implements IItem {
this.title = title
this.description = description
this.id = id
this.links = links.map(l => new Link(l))
this.links = links.map((l) => new Link(l))
this.geometry = geometry
this.assets = {}

Expand Down
4 changes: 2 additions & 2 deletions src/stac_object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export abstract class STACObject implements ISTACObject {
* @returns Children Catalog and Collection links
*/
get_child_links(): Link[] {
return this.links.filter(l => l.rel === 'child')
return this.links.filter((l) => l.rel === 'child')
}

/**
* Filter links to items
* @returns Children Item links
*/
get_item_links(): Link[] {
return this.links.filter(l => l.rel === 'item')
return this.links.filter((l) => l.rel === 'item')
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/collection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Collection', () => {
collection.self_href =
'https://landsat-stac.s3.amazonaws.com/landsat-8-l1/catalog.json'

const child_urls = children_links.map(l => collection.url_for_link(l))
const child_urls = children_links.map((l) => collection.url_for_link(l))

expect(child_urls).toContainEqual(
'https://landsat-stac.s3.amazonaws.com/landsat-8-l1/010/catalog.json'
Expand Down
2 changes: 1 addition & 1 deletion test/mock_landsat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function mockLandsatCatalog() {
// If a URL matches the start of the landsat S3 url, then mock it
fetchMock.mockIf(
/^http?s:\/\/landsat-stac.s3.amazonaws.com.*$/,
async req => {
async (req) => {
// If the url is a key in the urlData object, return the data from storage
if (req.url in urlData) {
return urlData[req.url]
Expand Down
34 changes: 0 additions & 34 deletions tsdx.config.js

This file was deleted.

0 comments on commit c585031

Please sign in to comment.