mirror of
https://github.com/enso-org/enso.git
synced 2025-01-09 04:30:59 +03:00
Bump npm node version (https://github.com/enso-org/ide/pull/879)
Original commit: a642c94958
This commit is contained in:
parent
0bf67b4b8c
commit
cf68e6848d
2
gui/.github/workflows/build.yml
vendored
2
gui/.github/workflows/build.yml
vendored
@ -35,7 +35,7 @@ jobs:
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.18.4'
|
||||
node-version: '12.19.0'
|
||||
|
||||
- name: Build
|
||||
run: node ./run dist
|
||||
|
10
gui/.github/workflows/check.yml
vendored
10
gui/.github/workflows/check.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.18.4'
|
||||
node-version: '12.19.0'
|
||||
|
||||
- name: Build
|
||||
run: node ./run build
|
||||
@ -58,7 +58,7 @@ jobs:
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.18.4'
|
||||
node-version: '12.19.0'
|
||||
|
||||
- name: Building Rust Sources
|
||||
run: node ./run lint
|
||||
@ -79,7 +79,7 @@ jobs:
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.18.4'
|
||||
node-version: '12.19.0'
|
||||
|
||||
- name: Run tests
|
||||
run: node ./run test --no-wasm
|
||||
@ -112,7 +112,7 @@ jobs:
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.18.4'
|
||||
node-version: '12.19.0'
|
||||
|
||||
- name: Run tests
|
||||
run: node ./run test --no-native
|
||||
@ -134,7 +134,7 @@ jobs:
|
||||
# - name: Install Node
|
||||
# uses: actions/setup-node@v1
|
||||
# with:
|
||||
# node-version: '12.18.4'
|
||||
# node-version: '12.19.0'
|
||||
#
|
||||
# - name: Generate test profile
|
||||
# working-directory: src/rust
|
||||
|
@ -52,11 +52,22 @@ async function check_version (name,required,cfg) {
|
||||
version = version.trim()
|
||||
if (cfg.preprocess) { version = cfg.preprocess(version) }
|
||||
if (cfg.silent !== true) {
|
||||
console.log(`Checking '${name}' version.`)
|
||||
console.log(`Checking if '${name}' version is '${required}'.`)
|
||||
}
|
||||
if (version != required) {
|
||||
throw `[ERROR] The '${name}' version '${version}' does not match the required one '${required}'.`
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {section,run,run_read,check_version,with_cwd}
|
||||
async function get_npm_info (name) {
|
||||
let info = await run_read('npm',['info',name,'--json'])
|
||||
return JSON.parse(info)
|
||||
}
|
||||
|
||||
async function get_npm_lts_version_of (name) {
|
||||
let info = await get_npm_info(name)
|
||||
version = info['dist-tags'].lts
|
||||
return version
|
||||
}
|
||||
|
||||
module.exports = {section,run,run_read,check_version,get_npm_info,get_npm_lts_version_of,with_cwd}
|
||||
|
@ -210,7 +210,7 @@ commands.watch.rust = async function(argv) {
|
||||
let build_args = []
|
||||
if (argv.crate != undefined) { build_args.push(`--crate=${argv.crate}`) }
|
||||
build_args = build_args.join(' ')
|
||||
let target = '"' + `node ${paths.script.main} build --no-js --dev ${build_args} -- ` + cargoArgs.join(" ") + '"'
|
||||
let target = '"' + `node ${paths.script.main} --skip-version-validation build --no-js --dev ${build_args} -- ` + cargoArgs.join(" ") + '"'
|
||||
let args = ['watch','-s',`${target}`]
|
||||
await cmd.with_cwd(paths.rust.root, async () => {
|
||||
await cmd.run('cargo',args)
|
||||
|
16
gui/run
16
gui/run
@ -9,13 +9,19 @@ process.on('unhandledRejection', error => { throw(error) })
|
||||
|
||||
let args = process.argv.slice(2)
|
||||
|
||||
let no_validation = '--no-validation'
|
||||
let skip_validation = '--skip-version-validation'
|
||||
async function init () {
|
||||
if(!args.includes(no_validation)) {
|
||||
await cmd.check_version('node','v12.18.4',{silent:true})
|
||||
await cmd.check_version('npm','6.14.6',{silent:true})
|
||||
if(!args.includes(skip_validation)) {
|
||||
cmd.section('Version Validation')
|
||||
console.log("Use the `" + skip_validation + "` flag to skip it.")
|
||||
console.log("Querying npm for the latest LTS versions.")
|
||||
let node_lts_version = await cmd.get_npm_lts_version_of('node')
|
||||
let npm_lts_version = await cmd.get_npm_lts_version_of('npm')
|
||||
console.log("Checking versions of installed packages.")
|
||||
await cmd.check_version('node',`v${node_lts_version}`)
|
||||
await cmd.check_version('npm',npm_lts_version)
|
||||
await cmd.check_version('rustc','1.40.0-nightly',{
|
||||
preprocess:(v)=>v.substring(6,20),silent:true
|
||||
preprocess:(v)=>v.substring(6,20)
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user