* extracted promise lib files and tests from Ghost
* includes commits:
Updated var declarations to const/let and no lists
Move tests from core to root (#11700)
Extended sequence utility
Moved pipeline/sequence to lib/promise
* included commits:
Updated var declarations to const/let and no lists
Move tests from core to root (#11700)
Updated to use slugify method from SDK for safe string
Added Node v10 Support (#10058)
Dynamic Routing: Added migration for routes.yaml file (#9692)
Fixed missing Bluebird require in `security/password.js` (#9624)
🔥 Drop Node v4 Support
Added unit tests for models.Invite.add
Added lib.security.password lib
Moved unique identifier generation to lib/security
Moved tokens, url safe and safe string utility to lib/security
- History merged from Ghost, setup package structure and added a test
- This is exactly the kind of code that we should keep separate to Ghost, as it's rarely touched
- It's much easier to reason about and test when it's on its own
- `shellSync` was removed in execa v2
- this commit switches the usage to the recommended replacement; `sync`
- also adds a test for changelog, the part of code which uses execa
- 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!
- Creating a better, more long-term API here
- compress and extract are opposite, neat terms
- Use new Promise to get rid of callback argument when using archiver to compress a folder
- Add options argument, and make a couple of key details configurable
- Make the response intelligable
- Ensure both functions are consistent
- Updated tests to match
- switch back from @tryghost/extract-zip to extract-zip now that it has been fixed (and is much better maintained)
- switch the internal interface to be fully promise-based and test promise-based too
- move all test files from core/test to test/
- updated all imports and other references
- all code inside of core/ is then application code
- tests are correctly at the root level
- consistent with other repos/projects
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
- move all test files from core/test to test/
- updated all imports and other references
- all code inside of core/ is then application code
- tests are correctly at the root level
- consistent with other repos/projects
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>