Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into feat/upgrade-tailwind-4
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsMeBrianD committed Feb 10, 2025
2 parents d861792 + f34536c commit 825e45b
Show file tree
Hide file tree
Showing 83 changed files with 1,794 additions and 1,940 deletions.
6 changes: 6 additions & 0 deletions .changeset/hungry-donkeys-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@evidence-dev/sdk': patch
'@evidence-dev/universal-sql': patch
---

Fix type errors
6 changes: 0 additions & 6 deletions .changeset/new-tigers-confess.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rare-rivers-complain.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/seven-books-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@evidence-dev/evidence': minor
'@evidence-dev/core-components': minor
---

Improved settings page UI
7 changes: 0 additions & 7 deletions .changeset/slow-ties-do.md

This file was deleted.

10 changes: 10 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,15 @@ module.exports = {
browser: true,
es2017: true,
node: true
},
rules: {
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
]
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ packages/ui/core-components/coverage
sites/docs/.evidence/meta/query-cache/hashes.json

priority_support_users.csv
.aider*

evidence-*.tgz
18 changes: 18 additions & 0 deletions e2e/base-path/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# e2e-base-path

## 0.0.18

### Patch Changes

- Updated dependencies [b0c5f5c20]
- @evidence-dev/evidence@40.0.9

## 0.0.17

### Patch Changes

- Updated dependencies [17eb07aff]
- Updated dependencies [9179782aa]
- Updated dependencies [bcb0bf5dd]
- Updated dependencies [59d6755a8]
- @evidence-dev/core-components@5.1.2
- @evidence-dev/evidence@40.0.8

## 0.0.16

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion e2e/base-path/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "e2e-base-path",
"version": "0.0.16",
"version": "0.0.18",
"scripts": {
"build": "cross-env EVIDENCE_BUILD_DIR=./build/my-base-path evidence build",
"build:strict": "cross-env EVIDENCE_BUILD_DIR=./build/my-base-path evidence build:strict",
Expand Down
18 changes: 18 additions & 0 deletions e2e/dev-server-startup/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# e2e-dev-server-startup

## 0.0.6

### Patch Changes

- Updated dependencies [b0c5f5c20]
- @evidence-dev/evidence@40.0.9

## 0.0.5

### Patch Changes

- Updated dependencies [17eb07aff]
- Updated dependencies [9179782aa]
- Updated dependencies [bcb0bf5dd]
- Updated dependencies [59d6755a8]
- @evidence-dev/core-components@5.1.2
- @evidence-dev/evidence@40.0.8

## 0.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion e2e/dev-server-startup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "e2e-dev-server-startup",
"version": "0.0.4",
"version": "0.0.6",
"scripts": {
"build": "evidence build",
"build:strict": "evidence build:strict",
Expand Down
18 changes: 18 additions & 0 deletions e2e/prerender/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# e2e-prerender

## 0.0.22

### Patch Changes

- Updated dependencies [b0c5f5c20]
- @evidence-dev/evidence@40.0.9

## 0.0.21

### Patch Changes

- Updated dependencies [17eb07aff]
- Updated dependencies [9179782aa]
- Updated dependencies [bcb0bf5dd]
- Updated dependencies [59d6755a8]
- @evidence-dev/core-components@5.1.2
- @evidence-dev/evidence@40.0.8

## 0.0.20

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion e2e/prerender/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "e2e-prerender",
"version": "0.0.20",
"version": "0.0.22",
"scripts": {
"build": "evidence build",
"build:strict": "evidence build:strict",
Expand Down
18 changes: 18 additions & 0 deletions e2e/spa/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# e2e-spa

## 0.0.33

### Patch Changes

- Updated dependencies [b0c5f5c20]
- @evidence-dev/evidence@40.0.9

## 0.0.32

### Patch Changes

- Updated dependencies [17eb07aff]
- Updated dependencies [9179782aa]
- Updated dependencies [bcb0bf5dd]
- Updated dependencies [59d6755a8]
- @evidence-dev/core-components@5.1.2
- @evidence-dev/evidence@40.0.8

## 0.0.31

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion e2e/spa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "e2e-spa",
"version": "0.0.31",
"version": "0.0.33",
"scripts": {
"build": "cross-env VITE_EVIDENCE_SPA=true evidence build",
"build:strict": "cross-env VITE_EVIDENCE_SPA=true evidence build:strict",
Expand Down
18 changes: 18 additions & 0 deletions e2e/themes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# e2e-themes

## 0.0.29

### Patch Changes

- Updated dependencies [b0c5f5c20]
- @evidence-dev/evidence@40.0.9

## 0.0.28

### Patch Changes

- Updated dependencies [17eb07aff]
- Updated dependencies [9179782aa]
- Updated dependencies [bcb0bf5dd]
- Updated dependencies [59d6755a8]
- @evidence-dev/core-components@5.1.2
- @evidence-dev/evidence@40.0.8

## 0.0.27

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion e2e/themes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "e2e-themes",
"version": "0.0.27",
"version": "0.0.29",
"scripts": {
"build": "cross-env evidence build",
"build:strict": "cross-env evidence build:strict",
Expand Down
16 changes: 16 additions & 0 deletions packages/evidence/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @evidence-dev/evidence

## 40.0.9

### Patch Changes

- b0c5f5c20: Mute a warning that is caused by ESM/CJS interactions. There is an upcoming fix for this issue

## 40.0.8

### Patch Changes

- bcb0bf5dd: Update vite to 5.4.14
- Updated dependencies [17eb07aff]
- Updated dependencies [bcb0bf5dd]
- @evidence-dev/sdk@3.0.8
- @evidence-dev/universal-sql@2.2.9

## 40.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/evidence/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evidence-dev/evidence",
"version": "40.0.7",
"version": "40.0.9",
"description": "dependencies for evidence projects",
"type": "module",
"keywords": [
Expand Down
12 changes: 12 additions & 0 deletions packages/evidence/scripts/build-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ fsExtra.outputFileSync(
import { evidenceThemes } from '@evidence-dev/tailwind/vite-plugin';
import tailwindcss from '@tailwindcss/vite';
process.removeAllListeners('warning');
process.on('warning', (warning) => {
if (warning.name === 'ExperimentalWarning' &&
warning.message.includes('CommonJS module') &&
warning.message.includes('ES Module')) {
return;
}
console.warn(warning);
});
const logger = createLogger();
const strictFs = (process.env.NODE_ENV === 'development') ? false : true;
Expand Down
8 changes: 8 additions & 0 deletions packages/lib/component-utilities/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @evidence-dev/component-utilities

## 4.0.8

### Patch Changes

- Updated dependencies [17eb07aff]
- Updated dependencies [bcb0bf5dd]
- @evidence-dev/sdk@3.0.8

## 4.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/component-utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evidence-dev/component-utilities",
"version": "4.0.7",
"version": "4.0.8",
"description": "",
"main": "index.js",
"exports": {
Expand Down
8 changes: 8 additions & 0 deletions packages/lib/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @evidence-dev/sdk

## 3.0.8

### Patch Changes

- 17eb07aff: Override nanoid to 3.3.8
- bcb0bf5dd: Update vite to 5.4.14
- @evidence-dev/universal-sql@2.2.9

## 3.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evidence-dev/sdk",
"version": "3.0.7",
"version": "3.0.8",
"description": "",
"bin": {
"evidence-sdk": "./src/cli.js"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-nocheck Adding nocheck because type errors in this file were failing the build and @ItsMeBrianD told said this code is dead

import { getContext } from 'svelte';
import { ALL_QUERIES_CONTEXT_KEY, QUERIES_CONTEXT_KEY } from '$evidence/contextKeys';
import { Query } from '@evidence-dev/sdk/usql';
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/sdk/src/plugins/datasources/cli/edit/Options.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const OptionGetSpec = Symbol();
export const IsOptions = Symbol();

/**
* @param {import('../../schemas/datasourcePluginOptions.schema.js').IDatasourceOptionSpecSchema} fieldSpec
* @param {import('../../schemas/datasourcePluginOptions.schema.js').IDatasourceOptionSpec} fieldSpec
* @param {string} prop
* @param {*} sourceOptions
* @param {OptionsOpts} [opts]
Expand Down Expand Up @@ -228,7 +228,7 @@ export const getSecretOptions = (options) => filterByMode(options, OptionSecretM
/**
* @param {*} options
* @param {string[]} optionPath
* @returns {import('../../schemas/datasourcePluginOptions.schema.js').IDatasourceOptionSpecSchema}
* @returns {import('../../schemas/datasourcePluginOptions.schema.js').IDatasourceOptionSpec}
*/
export const getSpecAtPath = (options, optionPath) => {
let x = options[OptionSpecMode];
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/sdk/src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/// <reference path="./build-dev/vite/config-virtual.d.ts" />
/// <reference path="./build-dev/vite/evidence-config.d.ts" />
34 changes: 22 additions & 12 deletions packages/lib/sdk/src/utils/svelte/addBasePath.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
/**
* Adjusts a path to include the configured base path
* Ignores undefined, and absolute URLs
* @param {unknown} path
* @template T
* @param {T} path
* @param {import("../../configuration/schemas/config.schema.js").EvidenceConfig} config
* @example addBasePath('http://localhost:3000/test') // 'http://localhost:3000/test'
* @example addBasePath('/test') // '/base/test'
* @example addBasePath(undefined) // undefined
*
* @returns
* @returns {T | string}
*/
export const addBasePath = (path, config) => {
if (path instanceof String) path = path.toString();
if (typeof path !== 'string') return path;
if (path.startsWith('http')) return path;
if (path.startsWith('#')) return path; // ignore hash links
if (/^[^/]*:/.test(path)) return path; // ignore other protocols
/** @type {string} */
let _path;

if (path instanceof String) {
_path = path.toString();
} else if (typeof path !== 'string') {
return path;
} else {
_path = path;
}

if (_path.startsWith('http')) return _path;
if (_path.startsWith('#')) return _path; // ignore hash links
if (/^[^/]*:/.test(_path)) return _path; // ignore other protocols

let basePath = config.deployment.basePath;
if (basePath) {
Expand All @@ -24,12 +34,12 @@ export const addBasePath = (path, config) => {
if (basePath.endsWith('/')) {
basePath = basePath.slice(0, -1);
}
if (path.startsWith(basePath)) return path;
if (!path.startsWith('/')) {
path = `/${path}`;
if (_path.startsWith(basePath)) return _path;
if (!_path.startsWith('/')) {
_path = `/${_path}`;
}
return `${basePath}${path}`;
return `${basePath}${_path}`;
} else {
return path;
return _path;
}
};
Loading

0 comments on commit 825e45b

Please sign in to comment.