- the symlink test has been failing for some time because recent minors
of Node 12 produce different size zip files
- we were checking that the produced zip is a specific size, but we
basically just want to check it's smaller than the original folder
- this commit updates the test with the size of the original folder,
found by running `du -b test/fixtures/test-theme/`
refs https://github.com/TryGhost/Ghost/issues/11944
- it's useful for consuming applications to know if images can be transformed outside of actually performing the transform (eg, when outputting "resized" image URLs)
- added `canTransformFiles()` that returns a boolean for whether or not `sharp` is installed
refs TryGhost/Ghost#11835
- this error was added after this package was created. Once this gets released, we will be able to remove the errors file in the core 🥳
no-issue
This is a major change and will require that we explicitly define the
versions of the services which we depend on. This will make sure that
updated services will always be sure of what actions their dependents
will have.
refs https://github.com/TryGhost/Ghost/issues/11794
- archiver has an undocumented dot option, that allows you to include dotfiles
- our existing tests had a dotfile, but we didn't check properly that everything exists
- Swapped to using folder-hash to compare if the original, and compressed-then-decompressed folders are identical
- Added an example of a dotfolder with nested dotfile
- Updated compress to use the dot option, make it optional but on by default
- All var declarations are now const or let as per ES6
- All comma-separated lists / chained declarations are now one declaration per line
- This is for clarity/readability but also made running the var-to-const/let switch smoother
- ESLint rules updated to match
How this was done:
- npm install -g jscodeshift
- git clone https://github.com/cpojer/js-codemod.git
- git clone git@github.com:TryGhost/Ghost.git shallow-ghost
- cd shallow-ghost
- jscodeshift -t ../js-codemod/transforms/unchain-variables.js . -v=2
- jscodeshift -t ../js-codemod/transforms/no-vars.js . -v=2
- yarn
- yarn test
- yarn lint / fix various lint errors (almost all indent) by opening files and saving in vscode
- grunt test-regression
- sorted!
- All var declarations are now const or let as per ES6
- All comma-separated lists / chained declarations are now one declaration per line
- This is for clarity/readability but also made running the var-to-const/let switch smoother
- ESLint rules updated to match
How this was done:
- npm install -g jscodeshift
- git clone https://github.com/cpojer/js-codemod.git
- git clone git@github.com:TryGhost/Ghost.git shallow-ghost
- cd shallow-ghost
- jscodeshift -t ../js-codemod/transforms/unchain-variables.js . -v=2
- jscodeshift -t ../js-codemod/transforms/no-vars.js . -v=2
- yarn
- yarn test
- yarn lint / fix various lint errors (almost all indent) by opening files and saving in vscode
- grunt test-regression
- sorted!