Skip to content

Commit

Permalink
chore: fix static and unit tests after major deps update
Browse files Browse the repository at this point in the history
  • Loading branch information
Leksat committed Jan 27, 2025
1 parent 897d4c9 commit 672814b
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 170 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
}
},
"resolutions": {
"@types/express": "4",
"sharp": "0.33.3",
"@graphql-tools/load": "^8.0.2"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/npm/@amazeelabs/estimator/src/effects/scan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ test('full', async ({ repo, effectValue }) => {
await repo.write('schema/fragments/a.gql', '');
const result = await effectValue(scan);
expect(result.map((file) => file.substr(repo.directory.length))).toEqual([
'/schema/fragments/a.gql',
'/schema/schema.graphqls',
'/src/something.ts',
'/schema/schema.graphqls',
'/schema/fragments/a.gql',
]);
});
17 changes: 7 additions & 10 deletions packages/npm/@amazeelabs/estimator/src/effects/scan.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Effect } from 'effect';
import glob from 'glob';
import { glob } from 'glob';

import { configuration } from './configuration.js';

Expand All @@ -9,21 +9,18 @@ import { configuration } from './configuration.js';
export const scan = Effect.gen(function* () {
const config = yield* configuration;
const resolvedCwd = config.root;
const globOpts = {
absolute: true,
cwd: resolvedCwd,
} as Parameters<typeof glob>[1];

let matches: string[] = [];

for (const pattern of config.documents) {
matches = matches.concat(
yield* Effect.async<string[], Error>((resume) => {
glob(pattern, globOpts, (err, matches) => {
return err
? resume(Effect.fail(err))
: resume(Effect.succeed(matches));
});
glob(pattern, {
absolute: true,
cwd: resolvedCwd,
})
.then((matches) => resume(Effect.succeed(matches)))
.catch((err) => resume(Effect.fail(err)));
}),
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/npm/@amazeelabs/molecules/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { defineConfig, frontend } from '@internal/eslint-config';
export default defineConfig([
...frontend,
{
ignores: ['dist/**'],
ignores: ['dist/**', 'storybook-static/**'],
},
]);
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ function HeightTransition({
return (
<Transition
show={show}
style={{
transitionProperty: 'height',
transitionDuration: `${duration}ms`,
transitionDelay: `${delay}ms`,
transitionTimingFunction: 'ease-in-out',
}}
enterFrom="!h-0"
leaveTo="!h-0"
beforeEnter={() => {
Expand Down Expand Up @@ -61,7 +55,16 @@ function HeightTransition({
afterLeave?.();
}}
>
<div ref={ref}>{children}</div>
<div
style={{
transitionProperty: 'height',
transitionDuration: `${duration}ms`,
transitionDelay: `${delay}ms`,
transitionTimingFunction: 'ease-in-out',
}}
>
<div ref={ref}>{children}</div>
</div>
</Transition>
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/npm/@amazeelabs/publisher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@internal/eslint-config": "workspace:*",
"@types/cookie-parser": "1.4.7",
"@types/cors": "2.8.17",
"@types/express": "5.0.0",
"@types/express": "4.17.21",
"@types/express-session": "1.18.0",
"@types/express-ws": "3.0.4",
"@types/fs-extra": "11.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/npm/verdaccio-git/src/__tests__/package.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IUploadTarball, Logger } from '@verdaccio/types';
import fs from 'fs-extra';
import mock from 'mock-fs';
import { SimpleGit } from 'simple-git';
import tar from 'tar';
import * as tar from 'tar';

import * as composer from '../composer';
import { isGitPackage, proxyTarball, pushToGit } from '../package';
Expand Down
2 changes: 1 addition & 1 deletion packages/npm/verdaccio-git/src/package.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IUploadTarball, Logger } from '@verdaccio/types';
import fs, { readJSONSync } from 'fs-extra';
import { SimpleGit } from 'simple-git';
import tar from 'tar';
import * as tar from 'tar';

import { processComposerPackage } from './composer';

Expand Down
Loading

0 comments on commit 672814b

Please sign in to comment.