Skip to content

Commit

Permalink
*hotfix - fix tsc to output commonjs (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
luxalpa authored Nov 5, 2021
1 parent 5a10112 commit bc7a046
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 28 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "laika-react",
"version": "1.1.0",
"version": "1.1.1",
"description": "React Laika client",
"homepage": "https://github.com/MEDIGO",
"keywords": [
Expand Down Expand Up @@ -53,7 +53,6 @@
"eslint-plugin-react": "^7.25.1",
"eslint-plugin-react-hooks": "^4.2.0",
"html-webpack-plugin": "^5.3.2",
"lib": "link:./src",
"local-cypress": "^1.2.2",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.4.1",
Expand Down
6 changes: 3 additions & 3 deletions src/component.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { mount } from '@cypress/react'
import { Laika } from 'lib/component'
import { Config, LaikaContext } from 'lib/config'
import { mockRequest } from 'lib/mock/mockRequest'
import { cy, describe, it } from 'local-cypress'
import React from 'react'
import { Laika } from './component'
import { Config, LaikaContext } from './config'
import { mockRequest } from './mock/mockRequest'

describe('component', () => {
const uri = 'https://laika.example.com'
Expand Down
2 changes: 1 addition & 1 deletion src/component.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { bool, node, number, oneOfType, string } from 'prop-types'
import React from 'react'
import { useLaika } from 'lib/hook'
import { useLaika } from './hook'

export interface LaikaProps {
feature: string
Expand Down
6 changes: 3 additions & 3 deletions src/hook.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { mount } from '@cypress/react'
import { Config, LaikaContext } from 'lib/config'
import { useLaika } from 'lib/hook'
import { mockRequest } from 'lib/mock/mockRequest'
import { cy, describe, it } from 'local-cypress'
import React from 'react'
import { Config, LaikaContext } from './config'
import { useLaika } from './hook'
import { mockRequest } from './mock/mockRequest'

describe('useLaika', () => {
const uri = 'https://laika.example.com'
Expand Down
4 changes: 2 additions & 2 deletions src/hook.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LaikaContext } from 'lib/config'
import { DEFAULT_TIMEOUT, getFeatureStatus } from 'lib/utils'
import { useContext, useEffect, useRef, useState } from 'react'
import { LaikaContext } from './config'
import { DEFAULT_TIMEOUT, getFeatureStatus } from './utils'

export function useLaika(
feature: string,
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { getFeatureStatus } from 'lib/utils'
export { useLaika } from 'lib/hook'
export { Config, LaikaContext } from 'lib/config'
export { Laika } from 'lib/component'
export { getFeatureStatus } from './utils'
export { useLaika } from './hook'
export { Config, LaikaContext } from './config'
export { Laika } from './component'
4 changes: 2 additions & 2 deletions src/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cy, describe, it } from 'local-cypress'
import { mockRequest } from 'lib/mock/mockRequest'
import { getFeatureStatus } from 'lib/utils'
import { mockRequest } from './mock/mockRequest'
import { getFeatureStatus } from './utils'

describe('Utilities', () => {
describe('getFeatureStatus', () => {
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* Basic Options */
"incremental": true /* Enable incremental compilation */,
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"lib": [
"es2017",
"dom",
Expand Down Expand Up @@ -46,9 +46,6 @@
/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"baseUrl": ".",
"paths": {
"lib/*": ["src/*"]
},
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
7 changes: 0 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6238,7 +6238,6 @@ fsevents@~2.3.2:
eslint-plugin-react: ^7.25.1
eslint-plugin-react-hooks: ^4.2.0
html-webpack-plugin: ^5.3.2
lib: "link:./src"
local-cypress: ^1.2.2
postinstall-postinstall: ^2.1.0
prettier: ^2.4.1
Expand Down Expand Up @@ -6289,12 +6288,6 @@ fsevents@~2.3.2:
languageName: node
linkType: hard

"lib@link:./src::locator=laika-react%40workspace%3A.":
version: 0.0.0-use.local
resolution: "lib@link:./src::locator=laika-react%40workspace%3A."
languageName: node
linkType: soft

"listr2@npm:^3.8.3":
version: 3.12.2
resolution: "listr2@npm:3.12.2"
Expand Down

0 comments on commit bc7a046

Please sign in to comment.