Skip to content
Draft
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
2 changes: 0 additions & 2 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,3 @@ xunit
xvfb
yaegassy
yammlint
yarnpkg
yarnrc
4 changes: 2 additions & 2 deletions .config/mise.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[env]
# https://github.com/nodejs/corepack/issues/550
COREPACK_ENABLE_DOWNLOAD_PROMPT = 0
# Command such `yarn webpack-dev` might fail with
# Command such `pnpm webpack-dev` might fail with
# Reached heap limit Allocation failed - JavaScript heap out of memory
# https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes
# default 16 MiB for 64-bit systems and 8 MiB for 32-bit systems
Expand All @@ -23,6 +23,6 @@ _.python.venv = {create = true, path = "~/.local/share/virtualenvs/vsa", python
experimental = true

[tools]
# do not add tools unsupported on windows such: gh, yarn
# do not add tools unsupported on windows such: gh
direnv = "latest"
node = "20.19.3"
24 changes: 0 additions & 24 deletions .depcheckrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# for build and testing purposes.
export VIRTUAL_ENV="${HOME}/.local/share/virtualenvs/vsa"

# Command such `yarn webpack-dev` might fail with
# Command such `pnpm webpack-dev` might fail with
# Reached heap limit Allocation failed - JavaScript heap out of memory
# https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes
# default 16 MiB for 64-bit systems and 8 MiB for 32-bit systems
Expand Down
34 changes: 14 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,31 +152,33 @@ jobs:
xvfb
# asdf nodejs plugin requires: dirmngr gpg curl gawk

- name: Setup node.js
- name: Install pnpm # keep before setup-node
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Install node.js
uses: actions/[email protected]
with:
node-version: 20
# yarn cache is broken due https://github.com/actions/setup-node/issues/531
# cache: yarn
cache: pnpm

- name: Corepack enable
run: corepack enable
- name: Install node dependencies
run: pnpm install

- name: Enable caching
uses: actions/cache@v4
with:
path: |
.vscode-test
.yarn/cache
node_modules/.cache/webpack
out/ext
out/test-resources*/Visual Studio Code.app
out/test-resources*/chromedriver*
out/test-resources*/driverVersion
out/test-resources*/stable.zip
~/.cache/pip
~/.cache/yarn
key: ${{ runner.os }}-${{ matrix.task-name }}-${{ hashFiles('package.json', 'yarn.lock', '.config/requirements.txt', 'tools/*.*') }}
key: ${{ runner.os }}-${{ matrix.task-name }}-${{ hashFiles('package.json', 'pnpm-lock.yaml', '.config/requirements.txt', 'tools/*.*') }}

# - name: Enable caching for podman-machine
# if: "contains(matrix.os, 'macos')"
Expand All @@ -185,7 +187,7 @@ jobs:
# path: |
# ~/.local/share/containers
# ~/.config/containers
# key: ${{ runner.os }}-${{ matrix.task-name }}-${{ hashFiles('package.json', 'yarn.lock', '.config/requirements.txt', '**/Taskfile.yml', 'tools/*.*') }}
# key: ${{ runner.os }}-${{ matrix.task-name }}-${{ hashFiles('package.json', 'pnpm-lock.yaml', '.config/requirements.txt', '**/Taskfile.yml', 'tools/*.*') }}

- name: Setup task
uses: arduino/setup-task@v2
Expand Down Expand Up @@ -242,12 +244,6 @@ jobs:
# Ensure NODE_OPTIONS config on CI is identical with the one in .env
[[ "${NODE_OPTIONS:-}" == "$(direnv exec . printenv NODE_OPTIONS)" ]] || { echo "NODE_OPTIONS mismatch between .env and ci.yaml"; exit 97; }

- name: Install dependencies
uses: coactions/actions/yarn-install@fix/install
# backstage/actions/yarn-install@b3c1841fd69e1658ac631afafd0fb140a2309024 # v0.6.17
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}

- name: task setup
# starting podman machine can randomly get stuck on macos
timeout-minutes: 25
Expand Down Expand Up @@ -515,8 +511,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v4
with:
cache: yarn
cache-dependency-path: "**/yarn.lock"
cache: pnpm
node-version-file: .tool-versions

- name: Download the artifact
Expand All @@ -532,7 +527,7 @@ jobs:
files: "*.vsix"

- run: |
npm exec -- yarn install --immutable
npm exec -- pnpm install --immutable
ls -la *.vsix

- name: Setup python
Expand Down Expand Up @@ -563,8 +558,7 @@ jobs:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
cache: yarn
cache-dependency-path: "**/yarn.lock"
cache: pnpm
node-version-file: .tool-versions
registry-url: "https://registry.npmjs.org"

Expand Down
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ CHANGELOG.html
*.tgz
.task
.venv
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.DS_Store
.direnv
coverage
Expand Down
5 changes: 1 addition & 4 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[allowlist]
description = "Global Allowlist"
# Ignore based on any subset of the file path
paths = [
# Ignore yarn
'''\.yarn'''
]
paths = []
8 changes: 1 addition & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ci:
exclude: >
(?x)^(
.config/requirements.in|
pnpm-lock.yaml|
.*.svg
)$
minimum_pre_commit_version: 4.0.0 # Related to https://github.com/ekalinin/nodeenv/issues/369
Expand Down Expand Up @@ -54,12 +55,6 @@ repos:
- SC1091
- repo: local
hooks:
- id: depcheck
name: depcheck
entry: yarn dlx depcheck
language: system
pass_filenames: false
always_run: true
- id: eslint
name: eslint
entry: npm
Expand Down Expand Up @@ -118,7 +113,6 @@ repos:
- id: trailing-whitespace
exclude: >
(?x)^(
.yarn/.*|
examples/playbooks/(with-skip-tag-id|unicode).yml|
examples/playbooks/example.yml|
docs/als/settings.md
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@

"files.exclude": {
".task": true,
".yarn": true,
".vscode-test": true
},
"mochaExplorer.cwd": "packages/ansible-language-server",
"search.exclude": {
".vscode-test": true
},
"redhat.telemetry.enabled": false,
"eslint.useESLintClass": true
"eslint.useESLintClass": true,
"npm.packageManager": "pnpm"
}
942 changes: 0 additions & 942 deletions .yarn/releases/yarn-4.9.2.cjs

This file was deleted.

Empty file removed .yarn/versions/1930cf20.yml
Empty file.
Empty file removed .yarn/versions/32138da6.yml
Empty file.
Empty file removed .yarn/versions/852188ac.yml
Empty file.
Empty file removed .yarn/versions/8cdfa9a8.yml
Empty file.
Empty file removed .yarn/versions/97b67726.yml
Empty file.
Empty file removed .yarn/versions/f7343e71.yml
Empty file.
16 changes: 0 additions & 16 deletions .yarnrc.yml

This file was deleted.

22 changes: 6 additions & 16 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,22 @@ tasks:
cmds:
- task: setup
- uv pip install -r .config/requirements.in -c .config/constraints.txt
- yarn install
generates:
- node_modules/.yarn-state.yml
- pnpm install
sources:
- .config/constraints.txt
- .config/requirements.in
- node_modules/.yarn-state.yml
- package.json
- packages/*/package.json
- tools/test-setup.sh
- yarn.lock
run: once
interactive: true
build:
desc: Build the project
cmds:
- task: install
- npm exec -- yarn run clean
- npm exec -- yarn run als-compile
- npm exec -- yarn run compile
- npm exec -- pnpm run clean
- npm exec -- pnpm run als-compile
- npm exec -- pnpm run compile
- npm exec -- tsc -p ./
sources:
- Taskfile.yml
Expand All @@ -88,7 +84,6 @@ tasks:
- test/**/*
- tsconfig.json
- webpack.config.ts
- yarn.lock.json
code:
env:
# https://github.com/microsoft/vscode/issues/82524#issuecomment-1150315756
Expand All @@ -105,19 +100,14 @@ tasks:
cmds:
- uv pip compile -q --universal --no-annotate --output-file .config/constraints.txt .config/requirements.in
- task: install
# upgrade yarn itself
- yarn set version latest
- pnpm set version latest
# bumps some developments dependencies
- yarn ncu -u --workspaces -i
- pnpm ncu -u --workspaces -i
# disabled because it does not work recursively
# - yarn upgrade-interactive
# restores a potential update of @types/vscode
- yarn up "@types/vscode@${VSCODE_VERSION}"
- yarn dedupe
# running install after upgrade is needed in order to update the lock file
- task: shared:install
# check deps
- yarn dlx depcheck
- bash ./tools/precheck.sh
- "{{.VIRTUAL_ENV}}/bin/python3 -m pre_commit autoupdate"
- task: lint
Expand Down
2 changes: 1 addition & 1 deletion cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dictionaries:
ignorePaths:
- "**/requirements.in"
- .config/constraints.txt
- .yarn/
- pnpm-lock.yaml
- media
- package.json
- syntaxes
Expand Down
8 changes: 4 additions & 4 deletions docs/development/debug_extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ the required remote URLs so that you can create PRs.

### Step 2: Compile

Run `yarn install` in the root of the project (for the extension) and then run
Run `pnpm install` in the root of the project (for the extension) and then run
it again after navigating to the packages/ansible-language-server directory.

Then, run `yarn run compile` at both the levels.
Then, run `pnpm run compile` at both the levels.

### Step 3: Run Webpack dev

Navigate to the project root directory and run `yarn run webpack-dev`.
Navigate to the project root directory and run `pnpm run webpack-dev`.

!!! note

Expand All @@ -44,4 +44,4 @@ extension development host window to see the live changes.

When you switch between debug and compilation modes, or if you have a
compilation or debugger problem, clean the output directory by running
`yarn run clean`.
`pnpm run clean`.
3 changes: 1 addition & 2 deletions docs/development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Extension development.
## Build tasks

To ease local development and testing, we use
[taskfile.dev](https://taskfile.dev/) but you can also call yarn directly for
most commands if you want.
[taskfile.dev](https://taskfile.dev/).

To see all the commands available, run `task -l` and it will list all of them
along with their descriptions.
Expand Down
10 changes: 5 additions & 5 deletions docs/development/test_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ language feature.

## Running the Tests

Each type of test has its own script and can be run by `yarn run <script-name>`:
Each type of test has its own script and can be run by `pnpm run <script-name>`:

!!! tip

Always run `yarn run compile` before running the tests.
Always run `pnpm run compile` before running the tests.

### Extension test scripts

Expand All @@ -52,17 +52,17 @@ Each type of test has its own script and can be run by `yarn run <script-name>`:

!!! note

For `test-ui*` scripts, you must package and build a `.vsix file` of the extension by running `yarn run package`. As you run the UI tests, the .vsix file is automatically installed and the UI elements are checked.
For `test-ui*` scripts, you must package and build a `.vsix file` of the extension by running `task package`. As you run the UI tests, the .vsix file is automatically installed and the UI elements are checked.

!!! tip

In case of debugging, use `coverage-ui*` script for running UI tests. Make sure to compile the sources with:

`yarn webpack-dev`
`pnpm webpack-dev`

To run a single UI test case, you can use `MOCHA_GREP` environment variable as follows:

`MOCHA_GREP="your test case name in describe statement" yarn coverage-ui-current`
`MOCHA_GREP="your test case name in describe statement" pnpm coverage-ui-current`

### Language server test scripts

Expand Down
6 changes: 3 additions & 3 deletions docs/development/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Some views relies on Vite to be built. As a developer, you need first to:

- run `yarn run webpack`, this way the extension will be able to start
- run `pnpm run webpack`, this way the extension will be able to start
- then you can run the Extension with the `Debug Extension (Vite)`
configuration.

Expand Down Expand Up @@ -45,10 +45,10 @@ Copy the following example files to match the name of your new webview:
```

- Now you need to register your new VueJs file in the `vite.config.ts`, this way
the page will be render when `yarn vite-build` is called.
the page will be render when `pnpm vite-build` is called.

At this stage, the ViteJs side is ready and you should be able to call
`yarn vite-dev` and you should get an output similar too this:
`pnpm vite-dev` and you should get an output similar too this:

```console
VITE v6.3.5 ready in 542 ms
Expand Down
Loading
Loading