Skip to content

Commit

Permalink
Merge pull request #29 from observerly/feature/upgrade/dependencies
Browse files Browse the repository at this point in the history
chore: Upgraded @observerly/celestia => @observerly/polaris dependency.
  • Loading branch information
michealroberts authored Mar 29, 2022
2 parents 4b3f8c1 + 57c4f39 commit 274c20d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 28 deletions.
19 changes: 9 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"vue-tsc": "^0.30.1"
},
"dependencies": {
"@observerly/celestia": "^0.19.3",
"@observerly/polaris": "^0.53.0",
"@vueuse/core": "^7.4.1",
"vue": "^3.2.26"
}
Expand Down
4 changes: 2 additions & 2 deletions src/composables/useDegreeFormat/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {

import type {
EquatorialCoordinate
} from '@observerly/celestia'
} from '@observerly/polaris'

import {
useSetup
Expand Down Expand Up @@ -46,7 +46,7 @@ describe('useDegreeFormat', () => {
format: 'dms'
})

expect(degreeFormat.value).toBe(' 24\' 25.43"')
expect(degreeFormat.value).toBe('+07° 24\' 25.43"')
})
})
})
10 changes: 5 additions & 5 deletions src/composables/useDegreeFormat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
} from 'vue'

import {
parseDDToDMSHumanised,
parseDDToHMSHumanised
} from '@observerly/celestia'
parseDegreeToDMSHumanised,
parseDegreeToHMSHumanised
} from '@observerly/polaris'

export interface UseDegreeFormatOptions {
format: 'dms' | 'hms'
Expand All @@ -24,11 +24,11 @@ export const useDegreeFormat = (

const applyFormat = (degree: number) => {
if (format === 'dms') {
degreeFormat.value = parseDDToDMSHumanised(degree)
degreeFormat.value = parseDegreeToDMSHumanised(degree)
}

if (format === 'hms') {
degreeFormat.value = parseDDToHMSHumanised(degree)
degreeFormat.value = parseDegreeToHMSHumanised(degree)
}
}

Expand Down
12 changes: 6 additions & 6 deletions src/composables/useEquatorialCoordinate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import type {

import {
convertEquatorialToHorizontal,
stereoProjectHorizontalToCartesian2DCoordinate
} from '@observerly/celestia'
convertHorizontalToStereo
} from '@observerly/polaris'

import type {
Cartesian2DCoordinate,
CartesianCoordinate,
EquatorialCoordinate
} from '@observerly/celestia'
} from '@observerly/polaris'

export interface UseEquatorialCoordinateOptions {
/**
Expand Down Expand Up @@ -49,7 +49,7 @@ export interface UseEquatorialCoordinateOptions {
* Dimenions (Width & Height) of the Projection Surface:
*
*/
dimensions: ComputedRef<Cartesian2DCoordinate>
dimensions: ComputedRef<CartesianCoordinate>
/**
*
*
Expand Down Expand Up @@ -149,7 +149,7 @@ export const useEquatorialCoordinate = (

const height = dimensions.value.y

const { x: X, y: Y } = stereoProjectHorizontalToCartesian2DCoordinate(
const { x: X, y: Y } = convertHorizontalToStereo(
{
alt: alt.value,
az: az.value
Expand Down
6 changes: 3 additions & 3 deletions src/composables/useMount/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
import {
EquatorialCoordinate,
HorizontalCoordinate,
convertDegreesToHours
} from '@observerly/celestia'
convertDegreeToHour
} from '@observerly/polaris'

import {
UseStatusResponse
Expand Down Expand Up @@ -93,7 +93,7 @@ export const useMount = (options: UseMountOptions = defaultMountOptions): UseMou
): Promise<UseStatusResponse | undefined> => {
const { ra, dec } = params

const ha = convertDegreesToHours(ra)
const ha = convertDegreeToHour(ra)

const uri: URL = new URL(`${baseURL}/goto/coordinates/equatorial`)

Expand Down
2 changes: 1 addition & 1 deletion src/composables/useObserver/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

import type {
HorizontalCoordinate
} from '@observerly/celestia'
} from '@observerly/polaris'

// Ensuring any number meets validation for latitude:
export const validateLatitude = (latitude: number): boolean => {
Expand Down

0 comments on commit 274c20d

Please sign in to comment.