-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/describe-archive-cache-index
- Loading branch information
Showing
29 changed files
with
405 additions
and
94 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,5 @@ | ||
module.exports = { | ||
projects: [ | ||
"<rootDir>/jest/client.admin.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
projects: [ | ||
"<rootDir>/jest/client.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
projects: [ | ||
"<rootDir>/jest/client.other.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
projects: [ | ||
"<rootDir>/jest/client.stream.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
projects: [ | ||
"<rootDir>/jest/server.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const createConfig = require("./client.baseConfig"); | ||
|
||
const baseConfig = createConfig(); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
displayName: "client:admin", | ||
roots: ["<rootDir>/src/core/client/admin"], | ||
} |
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,87 @@ | ||
const path = require("path"); | ||
|
||
const createConfig = () => { | ||
const d3Pkgs = [ | ||
"d3", | ||
"d3-array", | ||
"d3-axis", | ||
"d3-brush", | ||
"d3-chord", | ||
"d3-color", | ||
"d3-contour", | ||
"d3-delaunay", | ||
"d3-dispatch", | ||
"d3-drag", | ||
"d3-dsv", | ||
"d3-ease", | ||
"d3-fetch", | ||
"d3-force", | ||
"d3-format", | ||
"d3-geo", | ||
"d3-hierarchy", | ||
"d3-interpolate", | ||
"d3-path", | ||
"d3-polygon", | ||
"d3-quadtree", | ||
"d3-random", | ||
"d3-scale", | ||
"d3-scale-chromatic", | ||
"d3-selection", | ||
"d3-shape", | ||
"d3-time", | ||
"d3-time-format", | ||
"d3-timer", | ||
"d3-transition", | ||
"d3-zoom", | ||
]; | ||
|
||
return { | ||
displayName: "jestBaseConfig", | ||
rootDir: "../../", | ||
roots: ["<rootDir>/src/core/"], | ||
collectCoverageFrom: ["**/*.{js,jsx,mjs,ts,tsx}"], | ||
coveragePathIgnorePatterns: ["/node_modules/"], | ||
setupFiles: [ | ||
"<rootDir>/src/core/client/test/polyfills.ts", | ||
"<rootDir>/src/core/client/test/setup.ts", | ||
], | ||
setupFilesAfterEnv: ["<rootDir>/src/core/client/test/setupTestFramework.ts"], | ||
testMatch: ["**/*.spec.{js,jsx,mjs,ts,tsx}"], | ||
testEnvironment: "node", | ||
testURL: "http://localhost", | ||
transform: { | ||
"^.+\\.jsx?$": "<rootDir>/node_modules/babel-jest", | ||
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest", | ||
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js", | ||
"^.+\\.ftl$": "<rootDir>/config/jest/contentTransform.js", | ||
"^(?!.*\\.(js|jsx|mjs|ts|tsx|css|json|ftl)$)": | ||
"<rootDir>/config/jest/fileTransform.js", | ||
}, | ||
transformIgnorePatterns: [ | ||
`[/\\\\]node_modules[/\\\\](?!(fluent|react-relay-network-modern|@coralproject/rte/lib|internmap|${d3Pkgs.join( | ||
"|" | ||
)})[/\\\\]).+\\.(js|jsx|mjs|ts|tsx)$`, | ||
], | ||
moduleNameMapper: { | ||
"^coral-account/(.*)$": "<rootDir>/src/core/client/account/$1", | ||
"^coral-admin/(.*)$": "<rootDir>/src/core/client/admin/$1", | ||
"^coral-auth/(.*)$": "<rootDir>/src/core/client/auth/$1", | ||
"^coral-count/(.*)$": "<rootDir>/src/core/client/count/$1", | ||
"^coral-ui/(.*)$": "<rootDir>/src/core/client/ui/$1", | ||
"^coral-stream/(.*)$": "<rootDir>/src/core/client/stream/$1", | ||
"^coral-framework/(.*)$": "<rootDir>/src/core/client/framework/$1", | ||
"^coral-common/(.*)$": "<rootDir>/src/core/common/$1", | ||
"^coral-test/(.*)$": "<rootDir>/src/core/client/test/$1", | ||
}, | ||
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "ftl"], | ||
globals: { | ||
"ts-jest": { | ||
babelConfig: true, | ||
tsConfig: path.resolve(__dirname, "../../src/core/client/tsconfig.json"), | ||
}, | ||
}, | ||
preset: "ts-jest/presets/js-with-babel", | ||
}; | ||
} | ||
|
||
module.exports = createConfig; |
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,83 +1,9 @@ | ||
const path = require("path"); | ||
const createConfig = require("./client.baseConfig"); | ||
|
||
const d3Pkgs = [ | ||
"d3", | ||
"d3-array", | ||
"d3-axis", | ||
"d3-brush", | ||
"d3-chord", | ||
"d3-color", | ||
"d3-contour", | ||
"d3-delaunay", | ||
"d3-dispatch", | ||
"d3-drag", | ||
"d3-dsv", | ||
"d3-ease", | ||
"d3-fetch", | ||
"d3-force", | ||
"d3-format", | ||
"d3-geo", | ||
"d3-hierarchy", | ||
"d3-interpolate", | ||
"d3-path", | ||
"d3-polygon", | ||
"d3-quadtree", | ||
"d3-random", | ||
"d3-scale", | ||
"d3-scale-chromatic", | ||
"d3-selection", | ||
"d3-shape", | ||
"d3-time", | ||
"d3-time-format", | ||
"d3-timer", | ||
"d3-transition", | ||
"d3-zoom", | ||
]; | ||
const baseConfig = createConfig(); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
displayName: "client", | ||
rootDir: "../../", | ||
roots: ["<rootDir>/src/core/client"], | ||
collectCoverageFrom: ["**/*.{js,jsx,mjs,ts,tsx}"], | ||
coveragePathIgnorePatterns: ["/node_modules/"], | ||
setupFiles: [ | ||
"<rootDir>/src/core/client/test/polyfills.ts", | ||
"<rootDir>/src/core/client/test/setup.ts", | ||
], | ||
setupFilesAfterEnv: ["<rootDir>/src/core/client/test/setupTestFramework.ts"], | ||
testMatch: ["**/*.spec.{js,jsx,mjs,ts,tsx}"], | ||
testEnvironment: "node", | ||
testURL: "http://localhost", | ||
transform: { | ||
"^.+\\.jsx?$": "<rootDir>/node_modules/babel-jest", | ||
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest", | ||
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js", | ||
"^.+\\.ftl$": "<rootDir>/config/jest/contentTransform.js", | ||
"^(?!.*\\.(js|jsx|mjs|ts|tsx|css|json|ftl)$)": | ||
"<rootDir>/config/jest/fileTransform.js", | ||
}, | ||
transformIgnorePatterns: [ | ||
`[/\\\\]node_modules[/\\\\](?!(fluent|react-relay-network-modern|@coralproject/rte/lib|internmap|${d3Pkgs.join( | ||
"|" | ||
)})[/\\\\]).+\\.(js|jsx|mjs|ts|tsx)$`, | ||
], | ||
moduleNameMapper: { | ||
"^coral-account/(.*)$": "<rootDir>/src/core/client/account/$1", | ||
"^coral-admin/(.*)$": "<rootDir>/src/core/client/admin/$1", | ||
"^coral-auth/(.*)$": "<rootDir>/src/core/client/auth/$1", | ||
"^coral-count/(.*)$": "<rootDir>/src/core/client/count/$1", | ||
"^coral-ui/(.*)$": "<rootDir>/src/core/client/ui/$1", | ||
"^coral-stream/(.*)$": "<rootDir>/src/core/client/stream/$1", | ||
"^coral-framework/(.*)$": "<rootDir>/src/core/client/framework/$1", | ||
"^coral-common/(.*)$": "<rootDir>/src/core/common/$1", | ||
"^coral-test/(.*)$": "<rootDir>/src/core/client/test/$1", | ||
}, | ||
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "ftl"], | ||
globals: { | ||
"ts-jest": { | ||
babelConfig: true, | ||
tsConfig: path.resolve(__dirname, "../../src/core/client/tsconfig.json"), | ||
}, | ||
}, | ||
preset: "ts-jest/presets/js-with-babel", | ||
}; | ||
} |
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,27 @@ | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const createConfig = require("./client.baseConfig"); | ||
|
||
const dir = "./src/core/client"; | ||
const dirItems = fs.readdirSync(dir); | ||
let roots = []; | ||
|
||
const excludedRoots = ["src/core/client/stream", "src/core/client/admin"]; | ||
|
||
for (const item of dirItems) { | ||
const fullPath = path.join(dir, item); | ||
const stats = fs.statSync(fullPath); | ||
if (stats.isDirectory() && !excludedRoots.includes(fullPath)) { | ||
roots.push(fullPath); | ||
} | ||
} | ||
|
||
roots = roots.map((r) => `<rootDir>/${r}`); | ||
|
||
const baseConfig = createConfig(); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
displayName: "client:other", | ||
roots | ||
} |
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,9 @@ | ||
const createConfig = require("./client.baseConfig"); | ||
|
||
const baseConfig = createConfig(); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
displayName: "client:stream", | ||
roots: ["<rootDir>/src/core/client/stream"], | ||
} |
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 fs from "fs"; | ||
import path from "path"; | ||
import appPaths from "../src/core/build/paths"; | ||
|
||
// Make sure any symlinks in the project folder are resolved: | ||
// https://github.com/facebookincubator/create-react-app/issues/637 | ||
const appDirectory = fs.realpathSync(process.cwd()); | ||
const resolveApp = (relativePath: string) => | ||
path.resolve(appDirectory, relativePath); | ||
|
||
// config after eject: we're in ./config/ | ||
export default { | ||
...appPaths, | ||
appJestConfig: resolveApp("config/jest.client.admin.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import fs from "fs"; | ||
import path from "path"; | ||
import appPaths from "../src/core/build/paths"; | ||
|
||
// Make sure any symlinks in the project folder are resolved: | ||
// https://github.com/facebookincubator/create-react-app/issues/637 | ||
const appDirectory = fs.realpathSync(process.cwd()); | ||
const resolveApp = (relativePath: string) => | ||
path.resolve(appDirectory, relativePath); | ||
|
||
// config after eject: we're in ./config/ | ||
export default { | ||
...appPaths, | ||
appJestConfig: resolveApp("config/jest.client.other.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import fs from "fs"; | ||
import path from "path"; | ||
import appPaths from "../src/core/build/paths"; | ||
|
||
// Make sure any symlinks in the project folder are resolved: | ||
// https://github.com/facebookincubator/create-react-app/issues/637 | ||
const appDirectory = fs.realpathSync(process.cwd()); | ||
const resolveApp = (relativePath: string) => | ||
path.resolve(appDirectory, relativePath); | ||
|
||
// config after eject: we're in ./config/ | ||
export default { | ||
...appPaths, | ||
appJestConfig: resolveApp("config/jest.client.stream.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import fs from "fs"; | ||
import path from "path"; | ||
import appPaths from "../src/core/build/paths"; | ||
|
||
// Make sure any symlinks in the project folder are resolved: | ||
// https://github.com/facebookincubator/create-react-app/issues/637 | ||
const appDirectory = fs.realpathSync(process.cwd()); | ||
const resolveApp = (relativePath: string) => | ||
path.resolve(appDirectory, relativePath); | ||
|
||
// config after eject: we're in ./config/ | ||
export default { | ||
...appPaths, | ||
appJestConfig: resolveApp("config/jest.client.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import fs from "fs"; | ||
import path from "path"; | ||
import appPaths from "../src/core/build/paths"; | ||
|
||
// Make sure any symlinks in the project folder are resolved: | ||
// https://github.com/facebookincubator/create-react-app/issues/637 | ||
const appDirectory = fs.realpathSync(process.cwd()); | ||
const resolveApp = (relativePath: string) => | ||
path.resolve(appDirectory, relativePath); | ||
|
||
// config after eject: we're in ./config/ | ||
export default { | ||
...appPaths, | ||
appJestConfig: resolveApp("config/jest.server.config.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
Oops, something went wrong.