Commit Graph

12 Commits

Author SHA1 Message Date
Jacob Burroughs 2f611b1765 Upgrade to node 18
refs AE-485

Change-Id: I32fe1a73dbed1b625a744efb47ca349ac6776035
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327039
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-09-11 17:28:59 +00:00
Charley Kline 947f4ef5f2 Upgrade node to latest 16 LTS (gallium)
Refs DE-1264
flag=none

Bumps minor version to the most recent, which brings
in some CVE fixes and other stuff that might not matter.

(This change only affects NVM users; the "blessed" node
version is still encoded in the Docker files.)

Test plan:
* you can install node modules and run webpack

Change-Id: I01dd63ce444df254bc5a6ca03aa76b1505b8fe37
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310896
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-02-13 17:35:16 +00:00
Aaron Ogata 6988472a2a upgrade node from 14.x to 16.x
refs DE-1264

Change-Id: If8b9d73a487b1914b19070a2249394e5116eb8d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295892
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
2022-07-12 12:41:09 +00:00
Ahmad Amireh 486b0bf72c upgrade to node14
fixes FOO-1527
flag  = none

test plan: you can install node modules and run webpack

Change-Id: I33347d791b0923f4471b555c6fac303b098b1ef4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257333
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-27 15:33:52 +00:00
Ahmad Amireh 45cb519d52 [node12] upgrade to node 12.19.1 (LTS)
fixes FOO-1116
flag = none

this upgrade was problematic mostly because of Node's support for ES
modules (ESM) that is still fairly recent and introduces some complexity
around packaging. This is also the reason for the considerable hack
related to @instructure packages (see inline documentation) that can be
removed once we fix things upstream

| test plan |
| --------- |

- install node 12 if needed (e.g. not on docker)
- purge your node modules:

    rm -rf {.,client_apps/*,gems/*,gems/plugins/*,packages/*}/node_modules

- make sure you can still build locally (native/docker)

    bundle exec rake canvas:compile_assets

Change-Id: If9605ac428f0ff228f8852f0becb9fbac750f1f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253166
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-12-11 03:45:31 +00:00
Derek Bender fef18b228a require node 10.16 for brotli support
Fixes: CCI-312
flag = none

Test Plan:
- builds pass

Change-Id: I419c5f8a2572195c3b81bf51c8028ceabb7df1bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231945
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-04-03 19:48:37 +00:00
Clay Diffrient ade362e515 Bump to Node 10
closes CORE-2329

There were some tests that were expecting a snapshot-like value
where it expected `new Date().toLocaleDateString()` to give something
Like “2016-7-11” but that was actually wrong. If you do
`new Date().toLocaleDateString()` in a browser it will give you
something like “7/11/2016”. And this new version of node matches what
a real browser would have done, so I just updated the specs so they
are looking for the correct format. This change does not actually
reflect a change in what a real user would see. Just what
jest/jsdom/node formats it as.

Test Plan:
  - check to make sure that the assignments 2 availability dates
    component produces markup exactly as it did before
  - Automated tests pass
  - Build canvas locally, everything passes.
  - Build canvas with docker, everything passes.

Change-Id: I74285cd6d9b251ca60ab79396e332cc3a419bcee
Reviewed-on: https://gerrit.instructure.com/177198
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-22 17:29:36 +00:00
Ryan Shaw ec0ed12ffb Use node 8.10.0 instead of 8.9.4
Test plan:
* automated builds should pass
* docker stuff should work

Change-Id: I120e5689b6b219dc295517e92047cdf3f8b5d61e
Reviewed-on: https://gerrit.instructure.com/143022
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-09 18:56:22 +00:00
Ryan Shaw c1c93e1e14 Use node 8.9.4
If you are getting errors about “The engine "node" is incompatible with 
this module. Expected version ">=8.9.4”.” after applying this change,
It means you need upgrade your node to 8.9.4. to do so:

if you use nvm: `nvm install` inside the canvas dir
If you use brew: `brew upgrade node`
If you use apt-get: see https://github.com/nodesource/distributions
If you use docker: rebuild your docker container

Closes: CORE-704

Test plan:
* js tests should pass
* webpack and brandable_css should generate the exact same
  CSS and JS output as before.
* all of our build tooling, including docker stuff, should continue
  to work and use Node 8. 

If you know of something else that needs to be updated to use node 8 
everywhere, let me know

Change-Id: Ic019710c219d8b8c627ce03e0dffde731cfa2856
Reviewed-on: https://gerrit.instructure.com/136802
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-03 20:41:37 +00:00
Ryan Shaw dd706d7ab4 bump node version to v6.9.5 (latest LTS)
refs: CNVS-31376

test plan

* compile_assets should work

Change-Id: Ia353545b8241360146d44dbb40c740744d07d3c9
Reviewed-on: https://gerrit.instructure.com/89127
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-02-09 22:31:33 +00:00
Ryan Shaw f02b43f574 upgrade to node 6
closes: CNVS-29725

this gets everything working on node 6.

As far as our build process goes, it cannot support
running on both node 6 at the same time as 0.12
since our i18nliner handlebars stuff uses jsdom and
one version of it only works on node <4 and the
next only works on 4+.

But the stuff in the production dependencies in
package.json, aka the stuff that runs on the job
servers (brandable_css), can work on both. we just
need to run npm rebuild on the job servers if the stuff
that was npm installed into ./node_modules was compiled
against a different version of node. that is done here:
https://gerrit.instructure.com/81254
that commit needs to be committed to caturday before
we commit and deploy this to beta

as far as managing node, there are 2 "official"
ways that will make you life easier, you can either
just use docker or use nvm (https://github.com/creationix/nvm)

if you use nvm and if you use ZSH:
Put this into your $HOME/.zshrc to call nvm use automatically
whenever you enter a directory that contains an
.nvmrc file with a string telling nvm which node to use:

  # place this after nvm initialization!
  autoload -U add-zsh-hook
  load-nvmrc() {
    if [[ -f .nvmrc && -r .nvmrc ]]; then
      nvm use
    elif [[ $(nvm version) != $(nvm version default)  ]]; then
      echo "Reverting to nvm default version"
      nvm use default
    fi
  }
  add-zsh-hook chpwd load-nvmrc
  load-nvmrc

but however you do it, as long as you have node 6.2
installed it should work

test plan:
* install nvm
* check this patchset out
* run bundle exec rake canvas:compile_assets
* it should work
* use theme editor to preview a change to a theme
* it should work

Change-Id: I1cc9faed361938afc713c4b921042386b956db70
Reviewed-on: https://gerrit.instructure.com/80839
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-08-09 23:37:07 +00:00
Ryan Shaw 02b182d9d7 add .nvmrc file so people that use NVM use the right node version
closes: CNVS-30354

test plan:

install nvm
run `nvm install` in with this checked out
it should say that it is using node 0.12.15

Change-Id: I0967b8e65d2e6a6b7ce00a63187ece0fbcd8204b
Reviewed-on: https://gerrit.instructure.com/84102
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-07-11 17:19:14 +00:00