Skip to content

Commit

Permalink
fix yarn version and update node tools
Browse files Browse the repository at this point in the history
- install yarn after node tools
- update node version to 20.15.1
- update npm/npx version to 10.7.0
- update yo version to 5.0.0
- update generator-code version to 1.11.1
- update oclif version to 4.14.6
- update typescript version to 5.5.3
- vs code version to 1.91.1*
- remove samuelcolvin.jinjahtml (vs code extension)
- install ginfuru.better-nunjucks (vs code extension)
- update s/w versions in README
  • Loading branch information
capsulecorplab committed Aug 10, 2024
1 parent b522056 commit c41905d
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 43 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
This repo provides a workspace for Mach 30 volunteers to work on [Mach 30 Modeling Language](https://github.com/Mach30/m30ml), [Mach 30 Project Manager](https://github.com/Mach30/m30mlTools), the [Distributed OSHW Framework (DOF)](https://github.com/Mach30/dof), and [Sliderule](https://github.com/Mach30/sliderule) based on the [Ansible based template for KASM Ubuntu Focal Images](https://github.com/j-simmons-phd/kasm-core-focal-template) template provided by @j-simmons-phd. The workspace is configured with the following software:

- Node JS Tools
- nodejs v20.11.1
- npm v10.2.4 (included with nodejs)
- npx v10.2.4 (included with nodejs)
- yarn v3.5.0
- oclif v3.10.0
- nodejs v20.15.1
- npm v10.7.0 (included with nodejs)
- npx v10.7.0 (included with nodejs)
- yarn v4.3.1
- oclif v4.14.6
- [cli-njk](https://github.com/elcharitas/cli-njk) v1.0.0
- Utilities
- git v2.45.2 with @capsulecorplab .gitconfig
Expand Down
74 changes: 36 additions & 38 deletions playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
name: build-essential
update_cache: yes

-
-
# Install NodeJS Tools
hosts: localhost
connection: local
Expand All @@ -76,21 +76,16 @@
- install_doctools

vars:
node_version: "20.11.1"
node_version: "20.15.1"
v_node_version: "v{{ node_version }}"
npm_version: "10.2.4"
npx_version: "10.2.4"
yarn_version: "3.5.0"
yo_version: "4.3.1"
generator_code_version: "1.7.5"
oclif_version: "4.3.6"
typescript_version: "5.1.3"
npm_cli_login_version: "1.0.0"
cli_njk_version: "1.0.0"
npm_version: "10.7.0"
npx_version: "10.7.0"
yo_version: "5.0.0"
generator_code_version: "1.11.1"
oclif_version: "4.14.6"
typescript_version: "5.5.3"

tasks: # Test Node JS Tools versions
- name: Install Yarn
shell: "corepack enable && corepack prepare yarn@{{ yarn_version }} --activate"
- name: Get node version
shell: node --version
register: installed_node_version
Expand All @@ -100,27 +95,18 @@
- name: Get npx installed version
shell: npx --version
register: installed_npx_version
- name: Get yarn version
shell: yarn --version
register: installed_yarn_version
- name: Get oclif version
shell: oclif --version 2>/dev/null | sed 's/\ /\n/g' | grep oclif | sed 's/\///g' | sed 's/[[:alpha:]|(|[:space:]]//g'
register: installed_oclif_version
- name: Get TypeScript Compiler version
shell: tsc --version | sed 's/[[:alpha:]|(|[:space:]]//g'
register: installed_tsc_version
- name: Get cli-njk version
shell: njk --version
register: installed_cli_njk_version
- name: Display node tool versions
debug:
msg: "Node = {{ installed_node_version.stdout }} | npm = {{ installed_npm_version.stdout }} | npx = {{ installed_npx_version.stdout }} | yarn = {{ installed_yarn_version.stdout }}"
msg: "Node = {{ installed_node_version.stdout }} | npm = {{ installed_npm_version.stdout }} | npx = {{ installed_npx_version.stdout }}"
- name: Display TypeScript Compiler version
debug:
msg: "tsc = {{ installed_tsc_version.stdout }}"
- name: Display cli-njk version
debug:
msg: "cli-njk = {{ installed_cli_njk_version.stdout }}"
- name: Test node version
fail:
msg: "NodeJS Version Error: Expected {{ v_node_version }} | Found {{ installed_node_version.stdout }}"
Expand All @@ -133,23 +119,14 @@
fail:
msg: "NPX Version Error: Expected {{ npx_version }} | Found {{ installed_npx_version.stdout }}"
when: installed_npx_version.stdout != npx_version
- name: Test yarn version
fail:
msg: "Yarn Version Error: Expected {{ yarn_version }} | Found {{ installed_yarn_version.stdout }}"
when: installed_yarn_version.stdout != yarn_version
- name: Test oclif version
fail:
msg: "oclif Version Error: Expected {{ oclif_version }} | Found {{ installed_oclif_version.stdout }}"
when: installed_oclif_version.stdout != oclif_version
when: installed_yarn_version.stdout != yarn_version
- name: Test TypeScript Compiler version
fail:
msg: "TypeScript Compiler Version Error: Expected {{ typescript_version }} | Found {{ installed_tsc_version.stdout }}"
when: installed_tsc_version.stdout != typescript_version
- name: Test cli-njk version
fail:
msg: "cli-njk Version Error: Expected {{ cli_njk_version }} | Found {{ installed_cli_njk_version.stdout }}"
when: installed_cli_njk_version.stdout != cli_njk_version

roles:
- role: grzegorznowak.nvm_node
Expand All @@ -164,10 +141,31 @@
version: "{{ oclif_version }}"
- name: typescript
version: "{{ typescript_version }}"
- name: npm-cli-login
version: "{{ npm_cli_login_version }}"
- name: cli-njk
version: "{{ cli_njk_version }}"

-
# Install Yarn
hosts: localhost
connection: local
gather_facts: yes
tags:
- install_yarn

vars:
yarn_version: "4.3.1"

tasks:
- name: Install Yarn
shell: "corepack enable && corepack prepare yarn@{{ yarn_version }} --activate"
- name: Get yarn version
shell: yarn --version
register: installed_yarn_version
- name: Display yarn versions
debug:
msg: "yarn = {{ installed_yarn_version.stdout }}"
- name: Test yarn version
fail:
msg: "Yarn Version Error: Expected {{ yarn_version }} | Found {{ installed_yarn_version.stdout }}"
when: installed_yarn_version.stdout != yarn_version

-
# install PlantUML
Expand Down Expand Up @@ -511,7 +509,7 @@
cmd: ln -s /usr/share/hunspell/* /home/dev/.config/Code/Dictionaries
roles:
- role: gantsign.visual-studio-code
visual_studio_code_version: "1.77.3*"
visual_studio_code_version: "1.91.1*"
users:
- username: "dev"
visual_studio_code_extensions:
Expand All @@ -520,7 +518,7 @@
- jebbs.plantuml
- asciidoctor.asciidoctor-vscode
- dendron.dendron
- samuelcolvin.jinjahtml
- ginfuru.better-nunjucks
- CurlyBrackets.markdown-word-count
- ban.spellright
- ms-python.python
Expand Down

0 comments on commit c41905d

Please sign in to comment.