Skip to content

Commit

Permalink
build: config
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Feb 15, 2024
1 parent b7b224e commit 62662b9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
15 changes: 10 additions & 5 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 @@ -30,7 +30,7 @@
"@dfinity/identity": "^0.20.2",
"@dfinity/principal": "^0.20.2",
"@junobuild/admin": "^0.0.45",
"@junobuild/cli-config": "file:../juno-js/packages/cli-config",
"@junobuild/config": "file:../juno-js/packages/config",
"@junobuild/core-peer": "^0.0.10",
"@junobuild/utils": "^0.0.18",
"conf": "^12.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/configs/juno.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {JunoConfigFnOrObject} from '@junobuild/cli-config';
import type {JunoConfigFnOrObject} from '@junobuild/config';

Check failure on line 1 in src/configs/juno.config.ts

View workflow job for this annotation

GitHub Actions / build

Cannot find module '@junobuild/config' or its corresponding type declarations.
import {existsSync} from 'node:fs';
import {access, readFile, writeFile} from 'node:fs/promises';
import {join} from 'node:path';
Expand Down
4 changes: 2 additions & 2 deletions src/utils/node.utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {transformFileSync} from '@babel/core';
import * as mod from '@babel/plugin-transform-modules-commonjs';
import * as ts from '@babel/preset-typescript';
import {defineConfig, type JunoConfig} from '@junobuild/cli-config';
import {defineConfig, type JunoConfig} from '@junobuild/config';

Check failure on line 4 in src/utils/node.utils.ts

View workflow job for this annotation

GitHub Actions / build

Cannot find module '@junobuild/config' or its corresponding type declarations.
import {readFileSync} from 'node:fs';

/**
Expand Down Expand Up @@ -48,7 +48,7 @@ export const nodeRequire = <T>(id: string): {default: T} => {
// We override defineConfig because the library is unknown in the module we are trying to load.
// This need to be a function and not an arrow function because of the "arguments"
Module._load = function (request: string): unknown {
if (request === '@junobuild/cli-config') {
if (request === '@junobuild/config') {
return {
defineConfig: (config: JunoConfig) => defineConfig(config)
};
Expand Down

0 comments on commit 62662b9

Please sign in to comment.