Browse Source

pioneer: joy-utils fix case-(in)-sensitivity issue with import path

On Mac is seems node import paths files take precedence over folder because of lack of
real case sensitivity in OSX file system. eg in this case: Transport.ts and ./transport (folder)

Added macos to github actions matrix to test and confirm
Mokhtar Naamani 4 years ago
parent
commit
2f2df785e0

+ 2 - 2
.github/workflows/pioneer-pr.yml

@@ -4,7 +4,7 @@ on: [pull_request, push]
 jobs:
   pioneer_build_code:
     name: Pioneer Build Code
-    runs-on: ubuntu-latest
+    runs-on: [ubuntu-latest, macos-latest]
     strategy:
       matrix:
         node-version: [12.x]
@@ -21,7 +21,7 @@ jobs:
 
   pioneer_build_i18n:
     name: Pioneer Build i18n
-    runs-on: ubuntu-latest
+    runs-on: [ubuntu-latest, macos-latest]
     strategy:
       matrix:
         node-version: [12.x]

+ 1 - 1
pioneer/packages/joy-utils/src/react/context/transport.tsx

@@ -2,7 +2,7 @@ import React, { createContext, useContext } from "react";
 import { ApiContext } from "@polkadot/react-api";
 import { ApiProps } from "@polkadot/react-api/types";
 
-import { Transport } from "../../transport";
+import Transport from "../../transport/index";
 
 export const TransportContext = createContext<Transport>((null as unknown) as Transport);
 

+ 1 - 1
pioneer/packages/joy-utils/src/react/hooks/useTransport.tsx

@@ -1,5 +1,5 @@
 import { useContext } from 'react';
-import { Transport } from "../../transport";
+import Transport from "../../transport/index";
 import { TransportContext } from "../context";
 
 export default function useTransport() {