Skip to content

Commit

Permalink
clean cache when customCompilers changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Damien Maillard committed Sep 30, 2021
1 parent 56f4c73 commit e2441e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/core",
"version": "21.0.1",
"version": "21.0.3",
"description": "Tool to develop, test and build js projects",
"license": "MIT",
"repository": {
Expand Down
4 changes: 1 addition & 3 deletions src/internal/compiling/compile-directory/validateMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export const validateMeta = async ({
logger.debug(`${urlToFileSystemPath(compiledFileUrl)} not modified`)

if (meta.sources.length === 0) {
logger.warn(
`meta.sources is empty, cache considered as invalid by precaution`,
)
logger.warn(`WARNING: meta.sources is empty for ${compiledFileUrl}`)
return {
code: "SOURCES_EMPTY",
valid: false,
Expand Down
4 changes: 3 additions & 1 deletion src/internal/compiling/startCompileServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -890,12 +890,14 @@ const createOutJSONFiles = ({
)
const jsenvCorePackageFilePath = urlToFileSystemPath(jsenvCorePackageFileUrl)
const jsenvCorePackageVersion = readPackage(jsenvCorePackageFilePath).version
const customCompilerPatterns = Object.keys(customCompilers)
const outDirectoryMeta = {
jsenvCorePackageVersion,
babelPluginMap,
compileServerGroupMap,
replaceProcessEnvNodeEnv,
processEnvNodeEnv,
customCompilerPatterns,
}
outJSONFiles.meta = {
url: metaOutFileUrl,
Expand All @@ -909,7 +911,7 @@ const createOutJSONFiles = ({
outDirectoryRelativeUrl,
importDefaultExtension,
inlineImportMapIntoHTML,
customCompilerPatterns: Object.keys(customCompilers),
customCompilerPatterns,
}
outJSONFiles.env = {
url: envOutFileUrl,
Expand Down

0 comments on commit e2441e1

Please sign in to comment.