Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1067,15 +1067,15 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
node-version: 24.19.0
cache: "npm"
cache-dependency-path: playground/package-lock.json
- uses: jetli/wasm-bindgen-action@20b33e20595891ab1a0ed73145d8a21fc96e7c29 # v0.2.0
- name: "Install Node dependencies"
run: npm ci --ignore-scripts
working-directory: playground
- name: "Build playgrounds"
run: npm run dev:wasm
run: npm run dev:build
working-directory: playground
- name: "Run TypeScript checks"
run: npm run check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: rustup target add wasm32-unknown-unknown
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
node-version: 24.19.0
package-manager-cache: false
- uses: jetli/wasm-bindgen-action@20b33e20595891ab1a0ed73145d8a21fc96e7c29 # v0.2.0
- name: "Install Node dependencies"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-ty-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: rustup target add wasm32-unknown-unknown
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
node-version: 24.19.0
package-manager-cache: false
- uses: jetli/wasm-bindgen-action@20b33e20595891ab1a0ed73145d8a21fc96e7c29 # v0.2.0
- name: "Install Node dependencies"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@ jobs:
run: |
# Wait for PR to be created before merging
sleep 10
gh pr merge --squash "$BRANCH_NAME"
# Use admin to bypass required review
gh pr merge --squash --admin "$BRANCH_NAME"
2 changes: 2 additions & 0 deletions playground/.npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
engine-strict = true
ignore-scripts = true
min-release-age = 7
9 changes: 5 additions & 4 deletions playground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ In-browser playground for Ruff. Available [https://play.ruff.rs/](https://play.r

## Getting started

Use npm 11.10.0 or newer so that the dependency cooldown in `.npmrc` is enforced.

Install the NPM dependencies with `npm ci --ignore-scripts`, and run the development server with
`npm start --workspace ruff-playground` or `npm start --workspace ty-playground`.
You may need to restart the server after making changes to Ruff or ty to re-build the WASM
module.

To run the datastore, which is based
on [Workers KV](https://developers.cloudflare.com/workers/runtime-apis/kv/),
install the [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/install-and-update/),
then run `npx wrangler@4.118.0 dev --local` from the `./playground/api` directory. Note that the datastore
is
only required to generate shareable URLs for code snippets. The development datastore does not
run `npm ci --ignore-scripts` and `npm start -- --local` from the `./playground/api` directory
to use the locked [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/install-and-update/).
The datastore is only required to generate shareable URLs for code snippets. The development datastore does not
require Cloudflare authentication or login, but in turn only persists data locally.

## Architecture
Expand Down
2 changes: 2 additions & 0 deletions playground/api/.npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
engine-strict = true
ignore-scripts = true
min-release-age = 7
3 changes: 3 additions & 0 deletions playground/api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions playground/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "api",
"version": "0.0.0",
"engines": {
"npm": ">=11.10.0"
},
"devDependencies": {
"@cloudflare/workers-types": "^5.0.0",
"miniflare": "^4.20260706.0",
Expand Down
3 changes: 3 additions & 0 deletions playground/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"private": true,
"version": "0.0.0",
"type": "module",
"engines": {
"npm": ">=11.10.0"
},
"scripts": {
"check": "npm run dev:wasm && npm run lint && npm run tsc",
"dev:wasm": "npm run dev:wasm --workspace ty-playground && npm run dev:wasm --workspace ruff-playground",
Expand Down
9 changes: 3 additions & 6 deletions playground/ruff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"prebuild": "npm run build:wasm",
"build": "vite build",
"build": "npm run build:wasm && vite build",
"build:wasm": "wasm-pack build ../../crates/ruff_wasm --target web --out-dir ../../playground/ruff/ruff_wasm",
"dev:wasm": "wasm-pack build ../../crates/ruff_wasm --dev --target web --out-dir ../../playground/ruff/ruff_wasm",
"predev:build": "npm run dev:wasm",
"dev:build": "vite build",
"prestart": "npm run dev:wasm",
"start": "vite",
"dev:build": "npm run dev:wasm && vite build",
"start": "npm run dev:wasm && vite",
"preview": "vite preview"
},
"dependencies": {
Expand Down
9 changes: 3 additions & 6 deletions playground/ty/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"prebuild": "npm run build:wasm",
"build": "vite build",
"build": "npm run build:wasm && vite build",
"build:wasm": "wasm-pack build ../../crates/ty_wasm --target web --out-dir ../../playground/ty/ty_wasm",
"dev:wasm": "wasm-pack build ../../crates/ty_wasm --dev --target web --out-dir ../../playground/ty/ty_wasm",
"predev:build": "npm run dev:wasm",
"dev:build": "vite build",
"prestart": "npm run dev:wasm",
"start": "vite",
"dev:build": "npm run dev:wasm && vite build",
"start": "npm run dev:wasm && vite",
"preview": "vite preview"
},
"dependencies": {
Expand Down
31 changes: 30 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ruff-lsp-test = [
"packaging>=23.1",
# ruff-lsp uses the pygls 1.x server API.
"pygls>=1.1.0,<2",
"pytest>=7.3.1,<8",
"pytest>=9.0.3,<10",
"pytest-asyncio>=0.21.2",
"python-lsp-jsonrpc>=1.0.0",
"typing-extensions>=4.7.1",
Expand All @@ -92,6 +92,35 @@ typeshed-formatting = [
]

[tool.uv]
no-build = true
# CI installs the local ecosystem runner and tools pinned to Git revisions.
no-binary-package = [
"black",
"docstring-adder",
"ecosystem-analyzer",
"mypy-primer",
"ruff-ecosystem",
"typeshed-client",
]
# Pin the isolated build environment for source-build exceptions.
build-constraint-dependencies = [
"editables==0.6",
"hatch-fancy-pypi-readme==25.1.0",
"hatch-vcs==0.5.0",
"hatchling==1.32.0",
"packaging==26.3",
"pathspec==1.1.1",
"pluggy==1.6.0",
"setuptools==84.0.0",
"setuptools-scm==10.2.1",
"tomli==2.4.1; python_version < '3.11'",
"tomlkit==0.15.1",
"trove-classifiers==2026.6.1.19",
"typing-extensions==4.16.0; python_version < '3.11'",
"uv-build==0.12.3",
"vcs-versioning==2.2.4",
"wheel==0.47.0",
]
exclude-newer = "P7D"

[tool.uv.dependency-groups]
Expand Down
13 changes: 9 additions & 4 deletions python/py-fuzzer/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "py-fuzzer"
version = "0.0.0"
description = "Run Ruff or ty on randomly generated Python source files."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
Expand All @@ -15,14 +16,14 @@ dependencies = [
fuzz = "fuzz:main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = ["flit-core>=3.12,<4"]
build-backend = "flit_core.buildapi"

[dependency-groups]
dev = ["mypy", "ruff", "ty"]

[tool.hatch.build.targets.wheel]
include = ["fuzz.py"]
[tool.flit.module]
name = "fuzz"

[tool.mypy]
files = "fuzz.py"
Expand Down Expand Up @@ -80,4 +81,8 @@ combine-as-imports = true
split-on-trailing-comma = false

[tool.uv]
no-build = true
no-binary-package = ["py-fuzzer"]
# Pin the isolated build environment for source-build exceptions.
build-constraint-dependencies = ["flit-core==3.12.0"]
exclude-newer = "P7D"
3 changes: 3 additions & 0 deletions python/py-fuzzer/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions python/ruff-ecosystem/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = ["uv_build>=0.12.3,<0.13"]
build-backend = "uv_build"

[project]
name = "ruff-ecosystem"
Expand All @@ -14,3 +14,12 @@ ruff-ecosystem = "ruff_ecosystem.cli:entrypoint"
[tool.ruff.lint]
ignore = ["T100"]
preview = true

[tool.uv]
no-build = true
no-binary-package = ["ruff-ecosystem"]
# Pin the isolated build environment for source-build exceptions.
build-constraint-dependencies = ["uv-build==0.12.3"]

[tool.uv.build-backend]
module-root = ""
1 change: 1 addition & 0 deletions scripts/add_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/add_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/benchmarks/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ linter = [
]

[tool.uv]
no-build = true
exclude-newer = "P7D"
1 change: 1 addition & 0 deletions scripts/build_ruff_pgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/bump-workspace-crate-versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/check_docs_formatted.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# dependencies = ["ruff"]
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/collect_ty_ecosystem_run_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/conformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/ecosystem_all_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# dependencies = ["tqdm"]
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/generate-crate-readmes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/generate_builtin_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/generate_known_standard_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# dependencies = ["stdlibs"]
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/generate_mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# ]
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/memory_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/publish-crates.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# dependencies = []
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
1 change: 1 addition & 0 deletions scripts/setup-crates-io-publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# dependencies = ["httpx"]
#
# [tool.uv]
# no-build = true
# exclude-newer = "P7D"
# ///

Expand Down
3 changes: 3 additions & 0 deletions scripts/setup_primer_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# dependencies = ["mypy-primer"]
#
# [tool.uv]
# no-build = true
# no-binary-package = ["mypy-primer"]
# build-constraint-dependencies = ["setuptools==84.0.0"]
# # This is the default for ad hoc use. Historical ecosystem reproduction must
# # bypass the adjacent lock and select ecosystem-analyzer's exact mypy-primer
# # revision and project Python version, as shown in the module docstring.
Expand Down
Loading