This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use unixify for checkIsInternalFunction, config, bundler, module…
… and resolve
- Loading branch information
1 parent
2325485
commit dd92b53
Showing
3 changed files
with
8 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import { FUNCTIONS_INTERNAL_DIR } from '../runtimes/constants.js' | ||
import unixify from 'unixify' | ||
|
||
export const checkIsInternalFunction = (srcDir = '') => { | ||
const BACKSLASH_REGEXP = /\\/g | ||
import { FUNCTIONS_INTERNAL_DIR } from '../runtimes/constants.js' | ||
|
||
// Backslashes need to be converted for Windows. | ||
return srcDir?.replace(BACKSLASH_REGEXP, '/').includes(FUNCTIONS_INTERNAL_DIR) | ||
} | ||
export const checkIsInternalFunction = (srcDir = '') => unixify(srcDir)?.includes(FUNCTIONS_INTERNAL_DIR) |