Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
name: Linting and formatting checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand All @@ -21,9 +21,9 @@ jobs:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ pnpm-debug.log*

# Netlify
.netlify
deno.lock
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.19.0
v24.14.1
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,20 @@ This project requires a YouTube API key which is used on various pages across th
YOUTUBE_API_KEY=<api_key>
```

Then, to get up and running on your machine. First start by [installing pnpm](https://pnpm.io/installation).
Then, to get up and running on your machine. First start by installing the latest version of node with nvm:

Afterwards, install dependencies:
```sh
nvm use
```

Next, install the latest version of [pnpm](https://pnpm.io/) with corepack:

```sh
npm install --global corepack@latest
corepack install
```

Next, install dependencies:

```sh
pnpm install
Expand All @@ -37,19 +48,29 @@ Finally, you can run a local Astro dev server by running the following command:
pnpm dev
```

### Developing for production

If you need to develop against a production build (for example, testing search functionality), you can do so by running the following command:

```sh
pnpm build && pnpm preview
```

This will build a production version of the site and serve it locally. Keep in mind that this won't rebuild when making local changes.

### Code formatting

If you use Visual Studio Code, install the [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) and [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extensions to automatically format your code as you make changes.

Alternatively, you may run `pnpm lint` or `pnpm format` to run ESLint and Prettier, respectively. All changes are automatically linted (and will atempt to auto-fix) on the git pre-commit hook.
Alternatively, you may run `pnpm lint:fix` or `pnpm format:fix` to run ESLint and Prettier, respectively. All changes are automatically linted (and will atempt to auto-fix) on the git pre-commit hook.

This repo runs automated checks on PRs, including the lint and formatting checks above. All PRs require linters to pass in order to deploy to production.

### Upgrading dependencies

It's a best practice to make sure that our dependencies are always up to date. You can run `scripts/upgrade-dependencies` to automatically install upgrades across all packages.
We strive make sure that our dependencies are always up to date, on known secure versions, and using exact versions specified in the package.json and in Github Actions workflows.

Do note that you will still need to verify that things work as expected.
To upgrade node dependencies, you can run `scripts/upgrade-dependencies` to automatically update all packages. Keep in mind that packages can have breaking changes between versions — please test upgrades and verify there are no known vulnerabilities (using `pnpm audit`) before merging them.

### Helpful resources

Expand Down
18 changes: 13 additions & 5 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { searchPlugin } from "./lib/searchPlugin";

const siteTitle = "Delta Lake";

export default defineConfig({
const config = {
site: "https://delta.io/",
scopedStyleStrategy: "where",
env: {
Expand All @@ -29,9 +29,6 @@ export default defineConfig({
"/blog/1": "/blog",
"/user-stories/1": "/user-stories",
},
adapter: netlify({
imageCDN: false,
}),
integrations: [
sitemap(),
favicons({
Expand Down Expand Up @@ -152,4 +149,15 @@ export default defineConfig({
},
}),
],
});
};

export default defineConfig(
import.meta.env.NETLIFY === "true"
? {
...config,
adapter: netlify({
imageCDN: false,
}),
}
: config,
);
11 changes: 0 additions & 11 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import importPlugin from "eslint-plugin-import";
import tseslint from "typescript-eslint";
import eslintPluginAstro from "eslint-plugin-astro";

Expand All @@ -19,16 +18,6 @@ export default [
},
{ files: ["**/*.{js,mjs,cjs,ts}"] },
{ languageOptions: { globals: globals.browser } },
{
plugins: {
import: importPlugin,
},
rules: {
"import/export": "error",
"import/no-duplicates": "warn",
"import/order": "error",
},
},
pluginJs.configs.recommended,
eslintPluginPrettierRecommended,
...tseslint.configs.recommended,
Expand Down
71 changes: 33 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"preview": "astro preview",
"astro": "astro",
"lint": "eslint .",
"format": "prettier --write .",
"lint:fix": "eslint . --fix",
"format": "prettier --check .",
"format:fix": "prettier --write .",
"prepare": "husky"
},
"lint-staged": {
Expand All @@ -25,45 +27,38 @@
},
"author": "Databricks OSS Team",
"license": "ISC",
"packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67",
"pnpm": {
"overrides": {
"sharp": "^0.34.4"
}
},
"dependencies": {
"@astrojs/netlify": "^6.5.13",
"@astrojs/rss": "^4.0.12",
"@fontsource-variable/source-code-pro": "^5.2.7",
"@fontsource/source-sans-pro": "^5.2.5",
"@pagefind/default-ui": "^1.4.0",
"@types/mdast": "^4.0.4",
"astro-config": "^0.2.1",
"astro-favicons": "^3.1.5",
"astro-orbit": "^0.2.0",
"astro": "^5.14.7",
"googleapis": "^164.1.0",
"pagefind": "^1.4.0",
"remark-directive": "^4.0.0",
"unist-util-visit": "^5.0.0"
"@astrojs/netlify": "7.0.5",
"@astrojs/rss": "4.0.18",
"@fontsource-variable/source-code-pro": "5.2.7",
"@fontsource/source-sans-pro": "5.2.5",
"@pagefind/default-ui": "1.4.0",
"@types/mdast": "4.0.4",
"astro": "6.1.2",
"astro-config": "0.2.2",
"astro-favicons": "3.1.6",
"astro-orbit": "0.2.1",
"googleapis": "171.4.0",
"pagefind": "1.4.0",
"remark-directive": "4.0.0",
"unist-util-visit": "5.1.0"
},
"devDependencies": {
"@astrojs/sitemap": "^3.6.0",
"@eslint/js": "^9.38.0",
"@typescript-eslint/parser": "^8.46.2",
"clsx": "^2.1.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-astro": "^1.3.1",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.4",
"eslint": "^9.38.0",
"globals": "^16.4.0",
"husky": "^9.1.7",
"lint-staged": "^16.2.5",
"prettier-plugin-astro": "^0.14.1",
"prettier": "^3.6.2",
"sharp": "^0.34.4",
"typescript-eslint": "^8.46.2",
"vitest": "^3.2.4"
"@astrojs/sitemap": "3.7.2",
"@eslint/js": "10.0.1",
"@typescript-eslint/parser": "8.58.0",
"clsx": "2.1.1",
"eslint": "10.1.0",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-astro": "1.6.0",
"eslint-plugin-prettier": "5.5.5",
"globals": "17.4.0",
"husky": "9.1.7",
"lint-staged": "16.4.0",
"prettier": "3.8.1",
"prettier-plugin-astro": "0.14.1",
"sharp": "0.34.5",
"typescript-eslint": "8.58.0",
"vitest": "4.1.2"
}
}
Loading