-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wip] revert compling cache-dir and remove non standard code from cac…
…he-dir (#6183) * dont transpile cache-dir - just remove flow types * flow-remove-types doesnt support optional chaining * format * move cache-dir back to root Gatsby dir, remove flow used in prefetcher.js * cleanup package.json * update yarn.lock * run tests in gatsby/cache-dir again * test running babel with miminimal config on cache-dir * doh, I don't need out-dir at all * format .babelrc
- Loading branch information
1 parent
6ea82e2
commit 2fd9026
Showing
36 changed files
with
80 additions
and
26 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
File renamed without changes.
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,41 @@ | ||
{ | ||
babelrc: false, | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
loose: true, | ||
modules: false, | ||
useBuiltIns: "usage", | ||
shippedProposals: true, | ||
targets: { | ||
browsers: [">0.25%", "not dead"], | ||
}, | ||
}, | ||
], | ||
[ | ||
"@babel/preset-react", | ||
{ | ||
useBuiltIns: true, | ||
pragma: "React.createElement", | ||
}, | ||
], | ||
], | ||
plugins: [ | ||
[ | ||
"@babel/plugin-proposal-class-properties", | ||
{ | ||
loose: true, | ||
}, | ||
], | ||
"@babel/plugin-syntax-dynamic-import", | ||
[ | ||
"@babel/plugin-transform-runtime", | ||
{ | ||
helpers: true, | ||
regenerator: true, | ||
polyfill: false, | ||
}, | ||
], | ||
], | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,30 @@ | ||
const path = require(`path`) | ||
const child = require(`child_process`) | ||
|
||
it(`Builds cache-dir with minimal config`, done => { | ||
const args = [ | ||
require.resolve(`@babel/cli/bin/babel.js`), | ||
path.join(__dirname, `..`), | ||
`--config-file`, | ||
path.join(__dirname, `.babelrc`), | ||
] | ||
|
||
const spawn = child.spawn(process.execPath, args) | ||
|
||
let stderr = `` | ||
let stdout = `` | ||
|
||
spawn.stderr.on(`data`, function (chunk) { | ||
stderr += chunk | ||
}) | ||
|
||
spawn.stdout.on(`data`, function (chunk) { | ||
stdout += chunk | ||
}) | ||
|
||
spawn.on(`close`, function () { | ||
expect(stderr).toEqual(``) | ||
expect(stdout).not.toEqual(``) | ||
done() | ||
}) | ||
}, 30000) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
8 changes: 1 addition & 7 deletions
8
packages/gatsby/src/cache-dir/prefetcher.js → packages/gatsby/cache-dir/prefetcher.js
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 was deleted.
Oops, something went wrong.