-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #841 from embroider-build/cache-busting
[Fix] Cache busting
- Loading branch information
Showing
7 changed files
with
139 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default function makePlugin(): any { | ||
// Dear future @rwjblue, | ||
// | ||
// This plugin exists as a sentinel plugin which has no behavior, but | ||
// provides a position in the babel configuration to include cache busting | ||
// meta-data about other plugins. Specifically their versions. | ||
// | ||
// Yours sincerely, | ||
// Contributor | ||
return {}; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { maybeNodeModuleVersion } from '../src/portable'; | ||
import { readJSONSync } from 'fs-extra'; | ||
|
||
const EMBROIDER_CORE_VERSION = readJSONSync(`${__dirname}/../package.json`).version; | ||
|
||
describe('maybeNodeModuleVersion', () => { | ||
test('it', () => { | ||
expect(() => maybeNodeModuleVersion('/dev/null')).toThrow(/Could not find package.json for '\/dev\/null'/); | ||
expect(() => maybeNodeModuleVersion('/does/not/exist')).toThrow( | ||
/Could not find package.json for '\/does\/not\/exist'/ | ||
); | ||
expect(maybeNodeModuleVersion(__dirname)).toEqual(EMBROIDER_CORE_VERSION); | ||
expect(maybeNodeModuleVersion(__filename)).toEqual(EMBROIDER_CORE_VERSION); | ||
}); | ||
}); |
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