Skip to content

Commit

Permalink
Revert "Release release-2025-01-09"
Browse files Browse the repository at this point in the history
  • Loading branch information
kwongz authored Jan 9, 2025
1 parent 6697931 commit 3d791c2
Show file tree
Hide file tree
Showing 126 changed files with 899 additions and 1,044 deletions.
5 changes: 0 additions & 5 deletions .changeset/blue-sloths-sort.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/clever-avocados-punch.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/cool-weeks-hang.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/five-bottles-worry.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/green-jeans-hide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sour-kings-move.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/twelve-toes-serve.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wise-papayas-clap.md

This file was deleted.

6 changes: 6 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ jobs:
isMain:
- ${{ github.base_ref == 'main' }}
exclude:
- isMain: false
node-version: 18
- isMain: false
node-version: 20
- isMain: false
os: macOS-latest
- isMain: false
os: windows-latest

name: e2e/${{ matrix.project }}/${{ matrix.os }}/node-${{ matrix.node-version}}
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ jobs:
isMain:
- ${{ github.base_ref == 'main' }}
exclude:
- isMain: false
node-version: 18
- isMain: false
node-version: 20
- isMain: false
os: macOS-latest

steps:
- run: git config --global core.autocrlf false
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ yarn.lock
/packages/components/*
**/dist/*
.changeset/*
vercel.json

*.yaml
/packages/ui/storybook-static/*
Expand Down
28 changes: 0 additions & 28 deletions e2e/hmr/tests/tests.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,3 @@ test.describe('error handling', () => {
await expect(page.getByText('"new" cannot be used as a query name')).toBeVisible();
});
});

test.describe('page query HMR', () => {
test('editing should HMR', async ({ page }) => {
const query0 = 'select * from orders;';

await page.goto('/orders');
// hard reload page for queries to SSR
await page.reload();

await waitForPageToLoad(page);

await expect(page.getByText('Loaded 10000 orders')).toBeVisible();

const query1 = 'select * from orders LIMIT 500;';
editFile('pages/orders.md', (content) => content.replace(query0, query1));
await waitForHMR(page);
await expect(page.getByText('Loaded 500 orders')).toBeVisible();

const query2 = 'select * from orders LIMIT 100;';
editFile('pages/orders.md', (content) => content.replace(query1, query2));
await waitForHMR(page);
await expect(page.getByText('Loaded 100 orders')).toBeVisible();

editFile('pages/orders.md', (content) => content.replace(query2, query0));
await waitForHMR(page);
await expect(page.getByText('Loaded 10000 orders')).toBeVisible();
});
});
5 changes: 0 additions & 5 deletions packages/lib/preprocess/src/process-queries.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ const createDefaultProps = function (filename, componentDevelopmentMode, duckdbQ
return `
// Update external queries
if (import.meta?.hot) {
import.meta.hot.on("vite:beforeUpdate", () => {
// remove all prerendered queries
delete props.data;
});
import.meta.hot.on("evidence:queryChange", ({queryId, content}) => {
let errors = []
if (!queryId) errors.push("Malformed event: Missing queryId")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export const Options = (spec, sourceOptions, opts) => {
ownKeys() {
const output = [];
for (const [specKey, specEntry] of Object.entries(spec)) {
if (specEntry.virtual) continue;
const valueKey = specEntry.children && specEntry.nest ? `_${specKey}` : specKey;
if (
!opts?.specMode /* Value Mode */ &&
Expand Down
117 changes: 0 additions & 117 deletions packages/lib/sdk/src/plugins/datasources/cli/edit/Options.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,103 +59,6 @@ const testSpec = {
}
};

const complexSpec = {
project_id: {
title: 'Project ID',
type: 'string',
secret: true,
virtual: false,
references: '$.keyfile.project_id',
forceReference: false,
required: true
},
location: {
title: 'Location (Region)',
type: 'string',
secret: false,
virtual: false,
forceReference: false,
required: false,
default: 'US'
},
authenticator: {
title: 'Authentication Method',
type: 'select',
secret: false,
virtual: false,
forceReference: false,
children: {
'service-account': {
keyfile: {
title: 'Credentials File',
type: 'file',
secret: false,
virtual: true,
forceReference: false,
fileFormat: 'json',
required: false
},
client_email: {
title: 'Client Email',
type: 'string',
secret: true,
virtual: false,
references: '$.keyfile.client_email',
forceReference: true,
required: true
},
private_key: {
title: 'Private Key',
type: 'string',
secret: true,
virtual: false,
references: '$.keyfile.private_key',
forceReference: true,
required: true
}
},
'gcloud-cli': {},
oauth: {
token: {
title: 'Token',
type: 'string',
secret: true,
virtual: false,
forceReference: false,
required: true
}
}
},
required: true,
options: [
{ value: 'service-account', label: 'Service Account' },
{ value: 'gcloud-cli', label: 'GCloud CLI' },
{ value: 'oauth', label: 'OAuth Access Token' }
],
nest: false,
default: 'service-account'
}
};
const complexOpts = {
location: 'US',
authenticator: 'service-account',
project_id: 'deadbeef-project',
keyfile: {
type: 'service_account',
project_id: 'deadbeef-project',
private_key_id: 'deadbeef',
private_key: 'my private key',
client_email: '[email protected]',
client_id: '42',
auth_uri: 'https://evidence.dev',
token_uri: 'https://evidence.dev',
auth_provider_x509_cert_url: 'https://evidence.dev',
client_x509_cert_url: 'https://evidence.dev'
},
client_email: 'https://evidence.dev',
private_key: 'my private key'
};

describe('Options', () => {
describe('get', () => {
describe('root-level', () => {
Expand Down Expand Up @@ -391,18 +294,6 @@ describe('getSecretOptions', () => {
expect(secrets.unnested).toBeUndefined();
expect(secrets).toEqual({ _secret: 'Hi!' });
});

it('should ignore virtual fields', () => {
const options = Options(complexSpec, complexOpts);

const secrets = getSecretOptions(options);

expect(secrets).toEqual({
client_email: 'https://evidence.dev',
private_key: 'my private key',
project_id: 'deadbeef-project'
});
});
});
describe('getSafeOptions', () => {
it('should return safe values', () => {
Expand Down Expand Up @@ -450,14 +341,6 @@ describe('getSafeOptions', () => {
expect(safes.unnested).toEqual('a');
expect(safes).toEqual({ _opt: 'Bye!', unnested: 'a' });
});

it('should ignore virtual fields', () => {
const options = Options(complexSpec, complexOpts);

const safes = getSafeOptions(options);

expect(safes).toEqual({ authenticator: 'service-account', location: 'US' });
});
});

describe('getSpecAtPath', () => {
Expand Down
11 changes: 0 additions & 11 deletions packages/lib/universal-sql/src/build-parquet.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ function convertArrayToVector(column, rawValues) {
case 'string':
return vectorFromArray(rawValues, new Utf8());
case 'date':
if (!rawValues.some((v) => v !== null)) {
// All null date columns error out, so we have to do this
// https://github.com/evidence-dev/evidence/issues/2897
// separate reason than the bool version
console.warn(
chalk.yellow(
`\nWarning: Column "${column.name}" (type Date) contains only null values so it has been cast to Float64`
)
);
return vectorFromArray(rawValues, new Float64());
}
// TODO: What gives with timezones
return vectorFromArray(rawValues, new TimestampMillisecond());
case 'boolean':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,15 @@
{:else}
<HiddenInPrint enabled={hideDuringPrint}>
<div
class={display === 'tabs'
? ''
: `inline-block overflow-scroll no-scrollbar align-bottom w-fit max-w-full flex-col mb-3 ml-0 mr-2`}
class={display === 'tabs' ? '' : 'inline-flex w-fit max-w-full flex-col mt-2 mb-4 ml-0 mr-2'}
>
{#if title}
<span class="text-xs font-medium block mb-0.5">{title}</span>
<span class="text-sm block mb-1">{title}</span>
{/if}
<div
class={display === 'tabs'
? 'my-6 flex flex-wrap gap-x-1 gap-y-1'
: 'inline-flex rounded-md shadow-sm mb-1 overflow-auto border border-base-300 no-scrollbar h-8'}
: 'inline-flex rounded-md shadow-sm shadow-base-100 overflow-auto h-8 border border-base-300 no-scrollbar'}
role="group"
>
{#if preset}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
on:click={() => ($inputs[name] = !$inputs[name])}
variant="outline"
size="sm"
class="min-w-40 inline-flex justify-between gap-4 items-center w-full max-w-fit mb-4 mr-2"
class="min-w-40 inline-flex justify-between gap-4 items-center w-full max-w-fit mb-2"
>
<p class="truncate font-medium">
{title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
variant="outline"
size="sm"
class={cn(
`flex justify-start ${range ? 'border-r-0 rounded-r-none text-left' : 'text-center'} font-normal`,
`flex justify-start ${range ? 'border-r rounded-r-none text-left' : 'text-center'} font-normal`,
!selectedDateInput && 'text-base-content-muted'
)}
builders={[builder]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
</script>
<HiddenInPrint enabled={hideDuringPrint}>
<div class="mb-4 ml-0 mr-2 inline-block">
<div class="mt-2 mb-4 ml-0 mr-2 inline-block">
{#if title}
<span class="text-xs font-medium text-base-content block mb-0.5">{title}</span>
<span class="text-sm text-base-content block mb-1">{title}</span>
{/if}
{#if $query?.error}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
{/each}
<HiddenInPrint enabled={hideDuringPrint}>
<div class="mb-4 ml-0 mr-2 inline-block">
<div class="mt-2 mb-4 ml-0 mr-2 inline-block">
{#if hasQuery && $query.error}
<span
class="group inline-flex items-center relative cursor-help cursor-helpfont-sans px-1 border border-negative py-[1px] bg-negative/10 rounded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,8 @@
<HiddenInPrint enabled={hideDuringPrint}>
<div class={`relative ${sizeClass} mb-10 select-none`}>
<p class="pb-2 truncate text-xs">
<span class="font-medium">{title}: </span>
<span class="text-xs">
{fmt ? formatValue($inputs[name], format_object) : $inputs[name]}</span
>
{title} :
<span class="text-xs">{fmt ? formatValue($inputs[name], format_object) : $inputs[name]}</span>
</p>
<SliderShadcn {min} {max} {step} {sizeClass} bind:value />
{#if showMaxMin}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
</script>

<HiddenInPrint enabled={hideDuringPrint}>
<div class="mb-4 ml-0 mr-2 inline-block align-bottom">
<div class="mt-2 mb-4 ml-0 mr-2 inline-block">
{#if title}
<span class="text-xs font-medium block mb-0.5">{title}</span>
<span class="text-sm block mb-1">{title}</span>
{/if}
<input
bind:value
class="font-medium border pb-1 pt-[3px] h-8 border-base-300 bg-base-100 pr-3 rounded-md px-2 sm:text-xs max-w-fit bg-transparent cursor-text bg-right bg-no-repeat focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-base-content-muted shadow-sm text-base placeholder:font-normal placeholder:text-base-content-muted/80"
class="font-medium border border-base-300 bg-base-100 p-1 mt-2 pr-5 h-8 rounded-md px-3 sm:text-xs flex flex-row items-center max-w-fit bg-transparent cursor-text bg-right bg-no-repeat focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-base-content-muted shadow-sm text-base"
{placeholder}
/>
</div>
Expand Down
Loading

0 comments on commit 3d791c2

Please sign in to comment.