Skip to content
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
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:

jobs:
check_branch:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
outputs:
should_build: ${{ steps.permitted.outputs.result }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Fetch remote branches
run: |
Expand Down Expand Up @@ -42,16 +42,22 @@ jobs:
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: volta-cli/action@2d68418f32546fd191eb666e232b321d5726484d # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Enable Corepack
run: corepack enable yarn

- name: Install dependencies
run: yarn

- name: Build packages
run: npm run build
run: yarn build

- name: Run tests from transpiled code
run: npx ocular-test dist
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,30 @@ on:
- master
pull_request:

permissions:
contents: read

jobs:
test-node:
runs-on: ubuntu-22.04
permissions:
checks: write
contents: read

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: volta-cli/action@2d68418f32546fd191eb666e232b321d5726484d # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
cache: "yarn"
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Enable Corepack
run: corepack enable yarn

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

- name: Run tests
env:
Expand All @@ -29,6 +40,6 @@ jobs:
yarn test ci

- name: Coveralls
uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # v1.2.5
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 9 additions & 5 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
should_deploy: ${{ endsWith(github.ref, steps.get_version.outputs.latest) }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Get version
id: get_version
Expand All @@ -30,14 +30,18 @@ jobs:
if: ${{ github.repository_owner == 'visgl' && needs.check_branch.outputs.should_deploy }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}

- name: Use Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: '18.x'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Enable Corepack
run: corepack enable yarn

- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.19.0
14 changes: 7 additions & 7 deletions modules/react-maplibre/src/components/globe-control.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from "react";
import { useEffect, memo } from "react";
import { applyReactStyle } from "../utils/apply-react-style";
import { useControl } from "./use-control";
import { ControlPosition } from "../types/lib";
import * as React from 'react';
import {useEffect, memo} from 'react';
import {applyReactStyle} from '../utils/apply-react-style';
import {useControl} from './use-control';
import {ControlPosition} from '../types/lib';

export type GlobeControlProps = {
/** Placement of the control relative to the map. */
Expand All @@ -12,8 +12,8 @@ export type GlobeControlProps = {
};

function _GlobeControl(props: GlobeControlProps) {
const ctrl = useControl(({ mapLib }) => new mapLib.GlobeControl(props), {
position: props.position,
const ctrl = useControl(({mapLib}) => new mapLib.GlobeControl(props), {
position: props.position
});

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion modules/react-maplibre/src/types/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type {
TerrainSpecification,
LogoControl,
LogoControlOptions,
GlobeControl,
GlobeControl
} from 'maplibre-gl';

export type {
Expand Down
Loading