Skip to content

Commit

Permalink
fix: module resolution fixed
Browse files Browse the repository at this point in the history
Signed-off-by: sarthakjdev <jsarthak448@gmail.com>
  • Loading branch information
sarthakjdev committed May 19, 2024
1 parent db79deb commit 090acb6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Extract package and semantic version from release tag
if: ${{ github.ref_type == 'tag' }}
id: extract-tag
uses: ./format-tag
uses: ./.github/workflows/format-tag
with:
tag: ${{ github.ref_name }}

Expand Down
12 changes: 6 additions & 6 deletions packages/create-wapi-app/src/create-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import {
import path from "node:path";
import process from "node:process";
import { URL } from "node:url";
import { glob } from "fast-glob";
import fastGlob from "fast-glob";
import chalk from "chalk";
import { installPackages } from "./reusable-function";
import { installPackages } from "./reusable-function.js";
import { PackageManagerEnum } from "./type.js";

const glob = fastGlob.glob

export async function createWhatsappBot(options: {
directory: string;
doInstallPackage: boolean;
Expand Down Expand Up @@ -58,8 +60,7 @@ export async function createWhatsappBot(options: {
const deno = packageManagerInUse === PackageManagerEnum.Deno;
await cp(
new URL(
`../template/${
deno ? "Deno" : isTypescriptEnabled ? "typeScript" : "javaScript"
`../template/${deno ? "Deno" : isTypescriptEnabled ? "typeScript" : "javaScript"
}`,
import.meta.url,
),
Expand All @@ -73,8 +74,7 @@ export async function createWhatsappBot(options: {
if (bun) {
await cp(
new URL(
`../template/Bun/${
isTypescriptEnabled ? "typeScript" : "javaScript"
`../template/Bun/${isTypescriptEnabled ? "typeScript" : "javaScript"
}/package.json`,
import.meta.url,
),
Expand Down
7 changes: 5 additions & 2 deletions packages/create-wapi-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"extends": "@wapijs/typescript-config/node.base.json",
"include": ["src/", "*.ts", "./.eslintrc.js", "template", "bin"],
"include": ["src/", "*.ts", "./.eslintrc.js", "bin"],
"exclude": ["template/"],
"compilerOptions": {
"module": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "dist",
"target": "ES2022",
"lib": ["ES2022"],
"resolveJsonModule": true
}
}

0 comments on commit 090acb6

Please sign in to comment.