Merge pull request #14790 from Braundo/main

inclusive terms
This commit is contained in:
Fredrik Adelöw
2022-11-30 12:56:30 +01:00
committed by GitHub
30 changed files with 49 additions and 38 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ export class CacheManager {
getClient: (opts = {}): CacheClient => {
const concreteClient = this.getClientWithTtl(pluginId, opts.defaultTtl);
// Always provide an error handler to avoid killing the process.
// Always provide an error handler to avoid stopping the process.
concreteClient.on('error', (err: Error) => {
// In all cases, just log the error.
this.logger.error(err);
@@ -133,7 +133,7 @@ describe('AwsS3UrlReader', () => {
});
};
it('creates a dummy reader without the awsS3 field', () => {
it('creates a sample reader without the awsS3 field', () => {
const entries = createReader({
integrations: {},
});
@@ -27,7 +27,7 @@ const TOKEN_EXPIRY_AFTER = Duration.fromObject({ hours: 1 });
const TOKEN_REISSUE_AFTER = Duration.fromObject({ minutes: 10 });
/**
* A token manager that issues static dummy tokens and never fails
* A token manager that issues static fake tokens and never fails
* authentication. This can be useful for testing.
*/
class NoopTokenManager implements TokenManager {
@@ -66,7 +66,7 @@ export class ServerTokenManager implements TokenManager {
private currentTokenPromise: Promise<{ token: string }> | undefined;
/**
* Creates a token manager that issues static dummy tokens and never fails
* Creates a token manager that issues static fake tokens and never fails
* authentication. This can be useful for testing.
*/
static noop(): TokenManager {
+1 -1
View File
@@ -64,7 +64,7 @@ export function findRootPath(
): string | undefined {
let path = searchDir;
// Some sanity check to avoid infinite loop
// Some confidence check to avoid infinite loop
for (let i = 0; i < 1000; i++) {
const packagePath = resolvePath(path, 'package.json');
const exists = fs.existsSync(packagePath);
+1 -1
View File
@@ -231,7 +231,7 @@ function createConfigForRole(dir, role, extraConfig = {}) {
},
restrictedImports: [
{
// Importing the entire MUI icons packages kills build performance as the list of icons is huge.
// Importing the entire MUI icons packages impedes build performance as the list of icons is huge.
name: '@material-ui/icons',
message: "Please import '@material-ui/icons/<Icon>' instead.",
},
+1 -1
View File
@@ -82,7 +82,7 @@ async function getProjectConfig(targetPath, displayName) {
let closestPkgJson = undefined;
let currentPath = targetPath;
// Some sanity check to avoid infinite loop
// Some confidence check to avoid infinite loop
for (let i = 0; i < 100; i++) {
const packagePath = path.resolve(currentPath, 'package.json');
const exists = fs.pathExistsSync(packagePath);
@@ -31,7 +31,7 @@ describe('formatErrorMessage with esbuild plugin error', () => {
plugin: 'esbuild',
message: 'test',
id: 'index.js',
errors: [{ text: 'Dummy', location: { line: 1, column: 1 } }],
errors: [{ text: 'Sample', location: { line: 1, column: 1 } }],
});
expect(msg).toContain('test\n\n');
});
+1 -1
View File
@@ -114,7 +114,7 @@ export function forwardFileImports(options: ForwardFileImportsOptions): Plugin {
return false;
}
// Sanity check, dunno if this can happen
// Confidence check, dunno if this can happen
if (!importer) {
throw new Error(`Unknown importer of file module ${id}`);
}
@@ -80,7 +80,7 @@ describe('LinkedPackageResolvePlugin', () => {
const callbackFalse = jest.fn();
tap(
{
request: 'dummy',
request: 'sample',
path: false,
},
'some-context',
+1 -1
View File
@@ -116,7 +116,7 @@ function getBasePath(configApi: Config) {
function readBasePath(configApi: ConfigApi) {
let { pathname } = new URL(
configApi.getOptionalString('app.baseUrl') ?? '/',
'http://dummy.dev', // baseUrl can be specified as just a path
'http://sample.dev', // baseUrl can be specified as just a path
);
pathname = pathname.replace(/\/*$/, '');
return pathname;
@@ -80,7 +80,7 @@ const useBaseUrl = () => {
*/
const useBasePath = () => {
// baseUrl can be specified as just a path
const base = 'http://dummy.dev';
const base = 'http://sample.dev';
const url = useBaseUrl() ?? '/';
const { pathname } = new URL(url, base);
return trimEnd(pathname, '/');
@@ -23,7 +23,7 @@ export default {
};
const text =
'Lorem Ipsum is simply dummy text of the printing and typesetting industry.';
'Lorem Ipsum is simply sample text of the printing and typesetting industry.';
export const Default = () => (
<Box maxWidth="200px">
+1 -1
View File
@@ -912,7 +912,7 @@
### Patch Changes
- 5aa4ceea6: Make sure to provide dummy routes for all external routes of plugins given to DevApp
- 5aa4ceea6: Make sure to provide sample routes for all external routes of plugins given to DevApp
- Updated dependencies [3a58084b6]
- Updated dependencies [e799e74d4]
- Updated dependencies [dc12852c9]
+5 -5
View File
@@ -165,9 +165,9 @@ export class DevAppBuilder {
* Build a DevApp component using the resources registered so far
*/
build(): ComponentType<{}> {
const dummyRouteRef = createRouteRef({ id: 'dummy' });
const DummyPage = () => <Box p={3}>Page belonging to another plugin.</Box>;
attachComponentData(DummyPage, 'core.mountPoint', dummyRouteRef);
const fakeRouteRef = createRouteRef({ id: 'fake' });
const FakePage = () => <Box p={3}>Page belonging to another plugin.</Box>;
attachComponentData(FakePage, 'core.mountPoint', fakeRouteRef);
const apis = [...this.apis];
if (!apis.some(api => api.api.id === scmIntegrationsApiRef.id)) {
@@ -188,7 +188,7 @@ export class DevAppBuilder {
for (const plugin of this.plugins ?? []) {
const targets: Record<string, RouteRef<any>> = {};
for (const routeKey of Object.keys(plugin.externalRoutes)) {
targets[routeKey] = dummyRouteRef;
targets[routeKey] = fakeRouteRef;
}
bind(plugin.externalRoutes, targets);
}
@@ -215,7 +215,7 @@ export class DevAppBuilder {
</Sidebar>
<FlatRoutes>
{this.routes}
<Route path="/_external_route" element={<DummyPage />} />
<Route path="/_external_route" element={<FakePage />} />
</FlatRoutes>
</SidebarPage>
</AppRouter>
@@ -64,7 +64,7 @@ describe('end-to-end', () => {
afterEach(async () => {
// On Windows the pid of a spawned process may be wrong
// Because of this, we should be kill the MKDocs after the test
// Because of this, we should stop the MKDocs after the test
// (e.g. https://github.com/nodejs/node/issues/4289#issuecomment-854270414)
if (process.platform === 'win32') {
const procs = await findProcess('name', 'mkdocs', true);
+1 -1
View File
@@ -63,7 +63,7 @@ export const run = async (
return childProcess;
};
// Block indefinitely and wait for a signal to kill the child process(es)
// Block indefinitely and wait for a signal to stop the child process(es)
// Throw error if any child process errors
// Resolves only when all processes exit with status code 0
export async function waitForSignal(