Commit Graph

292 Commits

Author SHA1 Message Date
Renovate Bot
d586ad780b Update dependency fs-extra to v9.0.1 2020-08-04 12:32:34 +00:00
Renovate Bot
da5d140ae6 Update dependency chalk to v4.1.0 2020-08-04 12:24:08 +00:00
Daniel Lockyer
d3459271bf Updated zip test to reflect intended behaviour
- 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/`
2020-08-04 13:05:34 +01:00
Kevin Ansfield
aef24f9ac3 Published new versions
- @tryghost/adapter-manager@0.1.7
 - @tryghost/image-transform@1.0.0
 - @tryghost/moleculer-service-from-class@0.2.3
 - @tryghost/mw-session-from-token@0.1.5
 - @tryghost/session-service@0.1.5
2020-07-02 18:01:49 +01:00
Kevin Ansfield
b02d82fb24 Added canTransformFiles() method
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
2020-07-02 18:00:12 +01:00
Renovate Bot
b4f8587e96 Update dependency typescript to v3.9.5 2020-06-04 19:20:06 +00:00
Fabien O'Carroll
76478e4c74 Published new versions
- @tryghost/adapter-manager@0.1.6
 - @tryghost/errors@0.2.0
 - @tryghost/image-transform@0.2.4
 - @tryghost/moleculer-service-from-class@0.2.2
 - @tryghost/mw-session-from-token@0.1.4
 - @tryghost/pretty-cli@1.2.7
 - @tryghost/release-utils@0.6.3
 - @tryghost/session-service@0.1.4
 - @tryghost/vhost-middleware@1.0.5
 - @tryghost/zip@1.1.1
2020-05-26 18:19:01 +02:00
Vikas Potluri
8ed65ff1e5 Add PasswordResetRequiredError (#68)
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 🥳
2020-05-26 17:09:44 +01:00
Renovate Bot
52f7aa09a8 Update dependency mocha to v7.2.0 2020-05-25 01:19:06 +00:00
Renovate Bot
7e56dfc286 Update dependency moleculer to v0.14.7 2020-05-22 18:15:58 +00:00
Renovate Bot
597538c575 Update dependency @types/sinon to v9.0.4 2020-05-21 22:17:35 +00:00
Renovate Bot
af9f20a195 Update dependency typescript to v3.9.3 2020-05-20 01:15:35 +00:00
Renovate Bot
957c62d040 Update dependency @types/sinon to v9.0.3 2020-05-19 20:15:48 +00:00
Fabien O'Carroll
c352667fb8 Published new versions
- @tryghost/moleculer-service-from-class@0.2.1
2020-05-18 15:41:58 +02:00
Fabien O'Carroll
6023d90089 Improved handling of invalid actions
no-issue
2020-05-18 15:41:16 +02:00
Fabien O'Carroll
f6bc34dbb2 Published new versions
- @tryghost/adapter-manager@0.1.5
 - @tryghost/image-transform@0.2.3
 - @tryghost/moleculer-service-from-class@0.2.0
 - @tryghost/mw-session-from-token@0.1.3
 - @tryghost/session-service@0.1.3
2020-05-18 15:22:55 +02:00
Fabien O'Carroll
9f9a67c453 Updated type definition files
no-issue
2020-05-18 15:21:44 +02:00
Fabien O'Carroll
2d520ec32f Used versions for service deps and instance (#63)
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.
2020-05-18 15:16:41 +02:00
Renovate Bot
e369bb92d3 Update dependency sharp to v0.25.3 2020-05-18 01:14:51 +00:00
Renovate Bot
59e1cb6444 Update dependency @types/sinon to v9.0.1 2020-05-15 15:13:13 +00:00
Renovate Bot
892d96fd83 Update dependency typescript to v3.9.2 2020-05-12 23:15:03 +00:00
Hannah Wolfe
ed3f229136 Published new versions
- @tryghost/adapter-manager@0.1.4
 - @tryghost/errors@0.1.3
 - @tryghost/image-transform@0.2.2
 - @tryghost/moleculer-service-from-class@0.1.3
 - @tryghost/mw-session-from-token@0.1.2
 - @tryghost/pretty-cli@1.2.6
 - @tryghost/release-utils@0.6.2
 - @tryghost/session-service@0.1.2
 - @tryghost/vhost-middleware@1.0.4
 - @tryghost/zip@1.1.0
2020-05-08 16:23:52 +01:00
Hannah Wolfe
7964f6ec82 Added dotfile support and set it on by default
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
2020-05-08 16:21:20 +01:00
Renovate Bot
242db117a8 Update dependency ghost-ignition to v4.2.1 2020-05-04 01:15:54 +00:00
Hannah Wolfe
1199859571 Updated var declarations to const/let and no lists
- 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!
2020-04-29 16:51:13 +01:00
Hannah Wolfe
36675b6494 Updated var declarations to const/let and no lists
- 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!
2020-04-29 16:51:13 +01:00
Renovate Bot
3497384003 Update dependency mocha to v7.1.2 2020-04-27 01:16:32 +00:00
Renovate Bot
8e1838877c Update dependency sywac to v1.3.0 2020-04-22 15:15:29 +00:00
Renovate Bot
5cec68ca01 Update dependency emoji-regex to v9 2020-04-22 15:57:56 +01:00
Renovate Bot
ea7b6a493d Update dependency chalk to v4 2020-04-22 15:50:19 +01:00
Renovate Bot
23f85b9dbb Update dependency request to v2.88.2 2020-04-22 15:49:04 +01:00
Renovate Bot
f561bdd7fb Update dependency request-promise to v4.2.5 2020-04-22 14:45:06 +00:00
Renovate Bot
1e393e56ef Update dependency archiver to v4 2020-04-22 15:43:45 +01:00
Renovate Bot
f900bff55e Update dependency ghost-ignition to v4.1.0 2020-04-22 14:15:01 +00:00
Renovate Bot
ba5925768c Update dependency lodash to v4.17.15 2020-04-22 13:24:17 +00:00
Renovate Bot
fd59b63dbf Update dependency bluebird to v3.7.2 2020-04-22 12:14:58 +00:00
Daniel Lockyer
2ef0b76371 Pinned all dependencies
no issue
2020-04-22 12:21:42 +01:00
Renovate Bot
5be8b5714c Pin dependencies 2020-04-22 12:15:08 +01:00
Fabien O'Carroll
36a201697f Published new versions
- @tryghost/moleculer-service-from-class@0.1.2
2020-04-17 18:10:05 +02:00
Fabien O'Carroll
74bd32a572 Added debug logging to createServiceProxy
no-issue
2020-04-17 18:07:30 +02:00
Fabien O'Carroll
c8417f8ee8 Published new versions
- @tryghost/moleculer-service-from-class@0.1.1
2020-04-16 15:58:47 +02:00
Fabien O'Carroll
299be9cc2e Updated logs to use debug rather than info
no-issue

This reduces noise in moleculer logs
2020-04-16 15:57:55 +02:00
Fabien O'Carroll
2802e1eb03 Published new versions
- @tryghost/adapter-manager@0.1.3
 - @tryghost/errors@0.1.2
 - @tryghost/image-transform@0.2.1
 - @tryghost/moleculer-service-from-class@0.1.0
 - @tryghost/mw-session-from-token@0.1.1
 - @tryghost/pretty-cli@1.2.5
 - @tryghost/release-utils@0.6.1
 - @tryghost/session-service@0.1.1
 - @tryghost/vhost-middleware@1.0.3
 - @tryghost/zip@1.0.1
2020-04-16 15:15:35 +02:00
Fabien O'Carroll
e05a5b4164 Added @tryghost/moleculer-service-from-class
no-issue

This is a wrapper used by CREAM to create moleculer service config from
class definitions
2020-04-16 15:14:03 +02:00
Renovate Bot
bcec46d0cf Update dependency sinon to v9.0.2 2020-04-08 12:16:19 +00:00
Hannah Wolfe
4626407970 Published new versions
- @tryghost/zip@1.0.0
2020-04-08 12:55:01 +01:00
Hannah Wolfe
adfb3fe499 Consistent interface and response
- 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
2020-04-08 12:48:20 +01:00
Hannah Wolfe
62c2fce6cc Switch to OG extract-zip w/ promise based interface
- 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
2020-04-08 12:48:20 +01:00
Daniel Lockyer
fec30521ad Published new versions
- @tryghost/adapter-manager@0.1.2
2020-04-07 15:42:49 +01:00
Fabien O'Carroll
f618bc5fcd Improved error messages for loading adapters
no-issue

Adds back functionality from
3988029472
2020-04-07 16:33:39 +02:00
Fabien O'Carroll
645ca9a547 Published new versions
- @tryghost/adapter-manager@0.1.1
2020-04-07 15:30:03 +02:00
Fabien O'Carroll
db96ccbfe5 Added check for Adapter prototype name
no-issue

This fixes issues when the adapter is using a different "instance" of
the base class, so we check the names are the same.
2020-04-07 15:29:15 +02:00
Daniel Lockyer
9ffee44ab7 Published new versions
- @tryghost/release-utils@0.6.0
2020-04-07 12:53:52 +01:00
Daniel Lockyer
62dbc9097b Added extraText to release
no issue
2020-04-07 12:50:54 +01:00
Fabien O'Carroll
583d357675 Published new versions
- @tryghost/adapter-manager@0.1.0
 - @tryghost/mw-session-from-token@0.1.0
2020-04-05 15:59:56 +02:00
Fabien O'Carroll
814c513b53 Added @tryghost/mw-session-from-token module (#32)
no-issue
2020-04-05 15:58:33 +02:00
Fabien O'Carroll
44db45b7c3 Added @tryghost/adapter-manager module (#38)
no-issue
2020-04-05 15:54:47 +02:00
Fabien O'Carroll
4990c05448 Published new versions
- @tryghost/session-service@0.1.0
2020-04-02 15:46:07 +02:00
Fabien O'Carroll
e95dffb1db Added @tryghost/session-service module (#35)
no-issue

This was refactored out of https://github.com/TryGhost/Ghost/pull/11701/
2020-04-02 15:26:05 +02:00
Daniel Lockyer
348185e3a4 Published new versions
- @tryghost/release-utils@0.5.0
2020-04-01 12:01:05 +01:00
Daniel Lockyer
ff4d8ef903 Switched to using token authentication for GitHub
no issue
2020-04-01 12:00:19 +01:00
Hannah Wolfe
7e20949956 Move tests from core to root (#11700)
- 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>
2020-03-30 16:26:47 +01:00
Hannah Wolfe
b57ecbcc4a Move tests from core to root (#11700)
- 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>
2020-03-30 16:26:47 +01:00
Hannah Wolfe
eb7e7a8f31 Published new versions
- @tryghost/image-transform@0.2.0
2020-03-25 20:54:28 +00:00
Hannah Wolfe
46d95ed306 Added tool for generating original filename
- this allows us to have a shared tool for generating _o filenames
2020-03-25 20:53:57 +00:00
Hannah Wolfe
6d6785ae99 Published new versions
- @tryghost/errors@0.1.1
 - @tryghost/image-transform@0.1.0
2020-03-25 14:57:48 +00:00
Hannah Wolfe
264ffeceef Cleaner, clearer more consistent API
- we have 2 methods, one to resize a buffer and one to resize a file path
- make these two things super clear!
2020-03-25 14:50:25 +00:00
Hannah Wolfe
54d3527b14 Added sharp as an optional dependency
- This is optional, we throw errors if it doesn't load
2020-03-25 14:49:02 +00:00
Hannah Wolfe
2d2e41ac76 Updated paths & tests to work in new pkg structure
- added export to index.js
- fixed all paths to match the new structure
- replaced should with testUtils
- changed name from manipulator to transform
2020-03-25 14:48:41 +00:00
Hannah Wolfe
80e320fd83 Cleanup repeated module mocking utils
- mock non existant module util was defined twice
- split it out properly from the rest of the utils, update all references
- this allows us to move this util out of the codebase along with other code, e.g. the image manipulation code
2020-03-25 14:48:41 +00:00
Hannah Wolfe
b8ab3414ff Update errors across lib/image and lib/request
- swap common.errors for @tryghost/errors
- doing this in batches across small parts of the codebase to reduce disruption
2020-03-25 14:48:41 +00:00
renovate[bot]
64129a5cfd Update Test & linting packages (major) (#10858)
no issue 

- Updated Test & linting packages
- Updated use of hasOwnProperty
- Using Object.prototype.hasOwnProperty instead (ref. eslint.org/docs/rules/no-prototype-builtins)
- Removed already defined built-in global variable Intl
- Applied `--fix` with lint command on `core/test` folder
- The rules were broken because some of them were made stricter for `eslint: recommended` ruleset (ref. https://eslint.org/docs/user-guide/migrating-to-6.0.0#eslint-recommended-changes)
- Removed redundant global variable declarations to pass linting
2020-03-25 14:48:41 +00:00
Katharina Irrgang
549cc7e47f Bumped sinon from 4.4.6 to 7.3.2 (#10400)
refs #9389

- https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md

Breaking changes for Ghost:

- no need to create a sandbox anymore, each file get's it's own sandbox
- just require sinon and use this sandbox
- you can still create separate sandboxes with .createSandbox
- reset single stubs: use .resetHistory instead of .reset

This is a global replace for any sandbox creation.

---

From https://sinonjs.org/releases/v7.2.3/sandbox/

> Default sandbox
> Since sinon@5.0.0, the sinon object is a default sandbox. Unless you have a very advanced setup or need a special configuration, you probably want to just use that one.
2020-03-25 14:48:41 +00:00
Hannah Wolfe
eb9b1ddc1f 🐛 Fixed responsive images for .icos
closes #10301

- we allow .ico files for icons, but we cannot resize these specialist files at present
2020-03-25 14:48:41 +00:00
Fabien O'Carroll
010d787046 🐛 Fixed responsive images for gifs & svgs (#10315)
closes #10301

* Redirected to original image for gifs & svgs

* Created canTransformFileExtension method

* Updated image middlewares to use canTransformFileExtension
2020-03-25 14:48:41 +00:00
Fabien O'Carroll
b4654b19d5 Cleaned up image manipulator (#10282)
no-issue

* Added InternalServerError to resizeImage

* Added a redirect to original image if sharp is missing

* Improved naming - safeMethod -> method

* Updated process method to follow same sharp check pattern

* Refactor safety wrapper into makeSafe function

* Moved generic manipulation error to makeSafe function

* Refactored unsafeProcess to use unsafeResizeImage

* Removed CRAZY catch
2020-03-25 14:48:41 +00:00
Fabien O'Carroll
4078dd7959 Supported dynamic image resizing for LocalFileStorage(#10184)
refs #10181 

* Added initial handleImageSizes middleware

* Implemented saveRaw method on local file storage

* Wired up handleImageSizes middleware

* Implemented delete for LocalFileStorage

* Removed delete method from theme Storage class

* Deleted sizes directory when theme is activated

* Ensured that smaller images are not enlarged

* Renamed sizes -> size

* Exited middleware as early as possible

* Called getStorage as late as possible

* Updated image sizes middleware to handle dimension paths

* Revert "Deleted sizes directory when theme is activated"

This reverts commit 9204dfcc73a6a79d597dbf23651817bcbfc59991.

* Revert "Removed delete method from theme Storage class"

This reverts commit b45fdb405a05faeaf4bd87e977c4ac64ff96b057.

* Revert "Implemented delete for LocalFileStorage"

This reverts commit a587cd6bae45b68a293b2d5cfd9b7705a29e7bfa.

* Fixed typo

Co-Authored-By: allouis <fabien@allou.is>

* Redirected to original image if no image_sizes config

* Refactored redirection because rule of three

* Updated comments

* Added rubbish tests

* Added @TODO comment for handleImageSizes tests

* Added safeResizeImage method to image manipulator

* Used image manipulator lib in image_size middleware
2020-03-25 14:48:41 +00:00
Nazar Gargol
29991c6718 🐛 Fixed image optimisation for input image being smaller than optimized one
closes #10144

- When the input image is well optimized and has smaller byte size than the processed one it's still being used
- Bumped sharp version to have access to `size` property
2020-03-25 14:48:41 +00:00
Nazar Gargol
eb203de714 Added ability to resize and compress images on upload (#9837)
refs #4453

* On by default

* Added config to disable resizing

* Added basic image optimization processing

* Added dep: sharp (optional dep)

* Added resize middleware

* Take care of rotation based on EXIF information

* Removed all meta data from optimised image

* Added handling if sharp could not get installed

* Do not read ext twice - optimisation

* Do not call sharp if config is disabled

* Do not remove the original image which was uploaded (store 2 images)

* Support of `req.files` for internal logic

* Disabled cache to enable file removal on Windows
2020-03-25 14:48:41 +00:00
Hannah Wolfe
de9e5cecd4 Prepared new image-transform package
- Ready to accept code and history from TryGhost/Ghost
- This will be what's known as image.manipulator in Ghost
2020-03-25 12:12:17 +00:00
Hannah Wolfe
52e5db44bf Added missing lodash dependency
- this is required by the errors module
- it still works because it's in other packages, but should be declared
2020-03-25 10:34:56 +00:00
Hannah Wolfe
c9921a35cd Published new versions
- @tryghost/errors@0.1.0
2020-03-25 10:24:53 +00:00
Hannah Wolfe
dc879d127c Updated paths & tests to work in new pkg structure
- added export to index.js
 - fixed all paths to match the new structure
 - replaced should with testUtils
2020-03-25 10:24:33 +00:00
Rishabh Garg
9827594670 🏗Added host config limits for member emails (#11439)
no issue

Introduces host limits config for allowing email limits with members.
2020-03-25 10:24:33 +00:00
Kevin Ansfield
9fe54bb34e Added logging of slow {{#get}} helper uses (#10779)
no issue

- `{{#get}}` can slow down requests a lot if not used carefully, typically by using `limit="all"` or similar which can force a lot of data to be fetched and processed
- adds a warning log if we detect any `{{#get}}` helper call which takes longer than a certain threshold (default 200ms)
- allow log level and threshold to be configured via config to allow for different environments behaviours and requirements

New config options:
```
{
    "logging": {
        "slowHelper": {
            "level": "warn",
            "threshold": 200
        }
    }
}
```

Example output for `{{#get "tags" limit="all" order="name asc"}}` with a lot of tags:

```
[2019-06-07 10:35:52] WARN {{#get}} helper took 453ms to complete

{{#get}} helper took 453ms to complete

Error ID:
    062daed0-8910-11e9-8185-3b615ad8677d

Error Code:
    SLOW_GET_HELPER

Details:
    api:          v2.tagsPublic.browse
    apiOptions:
      order: name asc
      limit: all
    returnedRows: 1698
```
2020-03-25 10:24:33 +00:00
Nazar Gargol
1fcf3d0996 Removed unused GhostErrors
refs #10438
2020-03-25 10:24:33 +00:00
Anonymous
e3ba60ca05 ES6 migration: server/lib/common (#9779)
refs #9589
2020-03-25 10:24:33 +00:00
kirrg001
27ae1b5163 Removed old jshint/jscs rules
refs bcf5a1bc34

- leftovers
2020-03-25 10:24:33 +00:00
Katharina Irrgang
b4f398ec6a Tidy up unit test files (#9340)
refs #9178

- first iteration of tidying up the unit tests
- this is useful in the current stage, because if i move files in the server folder, i need a clean folder/file structure to detect which tests needs to move
- this is a simple cleanup to reflect the current server folder structure
2020-03-25 10:24:33 +00:00
kirrg001
46d392bc84 Moved errors,logging,i18n and events to lib/common
refs #9178
2020-03-25 10:24:33 +00:00
Hannah Wolfe
4ff036b1c3 Prepared new errors package
- Ready to accept code and history from TryGhost/Ghost
2020-03-25 10:24:33 +00:00
Hannah Wolfe
1c57c8d34a Published new versions
- @tryghost/pretty-cli@1.2.4
 - @tryghost/release-utils@0.4.2
 - @tryghost/vhost-middleware@1.0.2
 - @tryghost/zip@0.1.0
2020-03-20 20:20:56 +00:00
Hannah Wolfe
3b6021a34e Swap extract-zip for @tryghost/extract-zip
- our version has some bug fixes
2020-03-20 20:03:40 +00:00
Hannah Wolfe
35ff6d1462 Expose extract, promisify + test cleanup
- Expose extract-zip as a utility
- Wrap extract and zipFolder in promisify
- Cleanup tests slightly
2020-03-20 19:59:15 +00:00
Hannah Wolfe
099a93d4a4 Updated paths & tests to work in new pkg structure
- added export to index.js
- fixed all paths to match the new structure
- replaced should with testUtils
- moved code from describe block into before
2020-03-20 17:02:36 +00:00
Hannah Wolfe
43d0629346 Merged zip-folder files & history from TryGhost/Ghost 2020-03-20 16:29:37 +00:00
Hannah Wolfe
9fdeb7d654 Prepared new zip package
- Ready to accept code and history from TryGhost/Ghost
2020-03-20 16:21:52 +00:00
Renovate Bot
eaba1def62 Update dependency mocha to v7.1.1 2020-03-18 10:16:25 +00:00
Renovate Bot
2924a12c4d Update Test & linting packages 2020-03-10 17:10:43 +00:00
Daniel Lockyer
698261e294 Fixed lint issues
no issue
2020-03-10 17:07:36 +00:00
Daniel Lockyer
f80b5289b6 Added lock emoji to order list
no issue
2020-03-09 20:03:18 +00:00
Renovate Bot
968cc7f671 Update dependency chalk to v3 2020-03-09 13:38:32 +00:00
Renovate Bot
5ce0ff64a9 Update dependency ghost-ignition to v4 2020-03-09 13:37:55 +00:00
Daniel Lockyer
8c2d85825e Published new versions
- @tryghost/release-utils@0.4.1
2020-02-11 10:03:31 +00:00
Daniel Lockyer
f88cebc12c Fixed wrong usage of helper function
no issue
2020-02-11 10:01:39 +00:00
Daniel Lockyer
5fef535658 Published new versions
- @tryghost/pretty-cli@1.2.3
 - @tryghost/release-utils@0.4.0
 - @tryghost/vhost-middleware@1.0.1
2020-02-10 13:58:45 +00:00
Daniel Lockyer
620047169b Set a message if there are no emoji-prepended commits
no issue
2020-02-10 13:55:00 +00:00
Daniel Lockyer
45bd9ec37f Sorted the release changelog by emoji
no issue
2020-02-10 13:54:51 +00:00
John O'Nolan
3bd4d736d8 2020 2020-01-07 19:06:08 +00:00
Zlatan Vasović
0cb9685520 2020
refs 5e10faee8b
2020-01-06 10:51:18 +01:00
Renovate Bot
9b01975a7f Update Test & linting packages 2019-10-28 03:31:27 +00:00
Renovate Bot
a1c1a9e407 Pin dependency supertest to 4.0.2 2019-10-28 00:33:40 +00:00
Kevin Ansfield
495de734ab Published new versions
- @tryghost/pretty-cli@1.2.2
 - @tryghost/release-utils@0.3.3
 - @tryghost/vhost-middleware@1.0.0
2019-10-24 15:11:50 +01:00
Kevin Ansfield
a0b74b289a Added express 'trust proxy' support
no issue

- extracted from https://github.com/expressjs/vhost/pull/21
- uses `req.hostname` if it's available. `req.hostname` is set to the `x-forwarded-host` value when `'trust proxy'` setting is enabled in express
2019-10-24 15:11:08 +01:00
Kevin Ansfield
3e6a713658 Forked expressjs/vhost to vhost-middleware
no issue

Direct copy of current master from https://github.com/expressjs/vhost/ with automatic eslint fixes to match our styleguide.

Forked because we need a reverse proxy fix and the original module appears abandoned.
2019-10-24 14:53:06 +01:00
Naz Gargol
e1ec5aa405 🔥 Removed V1 code/references in frontend resources/routing layer (#11087)
no issue

- Removed v1 'author' leftover in include statement for preview controller
- Removed v1 'author' leftover in include statement for preview controller
- Removed v1 'author' leftover in include statement in entry lookup routing helper
- Migrated related test to use v2 API controller
- Removed v0.1 routing confif
- Removed v0.1 url config
- Fixed tests that had to do with url's in resources after removing v0.1 resources from URL cache
- Removed v1 'author' leftover in include statement in static routing helper
- Modified the test to use v2 API
- Removed v1 specific condition with 'page' in context helper
- Fixed dynamic routing spec after theme switch to v2. All tested users have to have at least one published post to be shown as an author
- Fixed URL Service spec to use theme engine v2
2019-09-10 11:41:42 +02:00
Sumedh Nimkarde
3e7a15b9ee 🐛 Ignored node_modules dir when archiving (#10969)
fixes #10929
2019-08-06 16:17:41 +08:00
Aileen Nowak
a54b40b9f8 Updated docs api links to be version-less 2019-07-25 15:17:23 +08:00
Aileen Nowak
30fda4eccd Updated links to docs (#10941)
no issue
2019-07-22 18:17:50 +08:00
Rish
58084ac96e Updated to use slugify method from SDK for safe string
refs #10618

- Updated lib safe string security method
2019-05-07 15:33:07 +05:30
Renovate Bot
2045157cb6 Update Test & linting packages 2019-04-22 01:28:43 +00:00
Renovate Bot
58f3f93822 Update dependency mocha to v6.1.3 2019-04-15 01:28:32 +00:00
Renovate Bot
7c19484dd2 Update dependency mocha to v6.1.1 2019-04-08 01:29:25 +00:00
Hannah Wolfe
982e045ba4 Update README.md to mention ui.log
- added missing docs for ui.log
2019-04-05 12:41:24 +01:00
Nazar Gargol
8a36066e81 Published new versions
- @tryghost/pretty-cli@1.2.1
 - @tryghost/release-utils@0.3.2
2019-04-05 15:52:24 +08:00
Nazar Gargol
931be83e7d Fixed repository reference for pretty-cli 2019-04-05 15:50:03 +08:00
Renovate Bot
8871293364 Update dependency sinon to v7.3.1 2019-03-27 12:08:01 +00:00
Rish
074c15acc3 Published new versions
- @tryghost/release-utils@0.3.1
2019-03-18 00:59:53 +05:30
Rish
ec94fb9529 🐛 Fixed changelog getting set as empty
no issue

- Changelog was set as empty due to concat creating new arrays
2019-03-18 00:43:40 +05:30
Rish
51693d0b5e Published new versions
- @tryghost/release-utils@0.3.0
2019-03-17 17:53:49 +05:30
Rish
86132d0681 releases.create accepts changelogPath as single path or array
- changelogPath can be a single path as before, or an array of paths with optional content which will be pre-pended
- Removed non-generic casper option from releases.create options
2019-03-17 17:53:17 +05:30
Rish
fc28d5e13f Published new versions
- @tryghost/release-utils@0.2.1
2019-03-17 13:27:05 +05:30
Rish
d0bde8c9bc Added casper changelog option to release draft
no issue

- Added option to allow appending casper changelog to main release draft
- Uses capser changelog path and new version info to append casper changes
2019-03-17 13:16:07 +05:30
kirrg001
dba3b43708 Published new versions
- @tryghost/release-utils@0.2.0
2019-03-14 17:13:24 +01:00
kirrg001
5247eb95f5 releases.create accepts optional content array
no issue

e.g. content: ['line\n']
2019-03-14 17:12:08 +01:00
kirrg001
0b49f17250 Published new versions
- @tryghost/release-utils@0.1.1
2019-03-14 16:52:23 +01:00
kirrg001
d7c930d278 🐛 Fixed changelog entry with emoji not being detected
no issue
2019-03-14 16:51:47 +01:00
kirrg001
89c555e29f Published new versions
- @tryghost/release-utils@0.1.0
2019-03-14 16:39:58 +01:00
kirrg001
696b87b103 Added more emoji tests
no issue
2019-03-14 16:35:48 +01:00
Fabien O'Carroll
23fd4702a0 Fixed emoji tests to use correct input data 2019-03-13 17:01:29 +01:00
Fabien O'Carroll
df57b8c944 Refactored emoji filtering to only loop once
Small perf improvment, also easier to read now because we can use 0
index which is more obvious as to what we're doing
2019-03-13 17:01:29 +01:00
Fabien O'Carroll
c681b8e9be Refactored line parsing to use regex
Was having issues debugging the index issue, and regex cleans it up a little
2019-03-13 17:01:29 +01:00
Fabien O'Carroll
f8f96b49db Fixed check for emoji index
The emoji *must* be at index=2 as each line looks like:
    "* <commit message>"
We use index=2 to make test whether emoji is first character(s) in the
commit message
2019-03-13 17:01:29 +01:00
Fabien O'Carroll
5e9bf5cfb5 Added error handling to filestream
This would have probably rejected the promise anyway because uncaught
error, but it's better to be explicit
2019-03-13 17:01:29 +01:00
Fabien O'Carroll
d40a44b9a0 Fixed passing request completion handler
We were passing this as the second argument to pipe - ups!
2019-03-13 17:01:29 +01:00
kirrg001
791a1b54b5 [@tryghost/release-utils] Removed unused dependencies
no issue

- ...unused? 👻
2019-03-12 21:55:00 +01:00
Katharina Irrgang
3cb6042b10 Added initial implementation of @tryghost/release-utils (#7)
- Added the first version of release-utils
- Will release a v0.0.1

- Be able to create changelog.md based on previous version.
- Be able to merge & clean changelog.md.
- Be able to create a gist
- Be able to filter commits by emojis (user-facing changes)
- Be able to create a draft release
- Be able to upload a release zip to Github

The goal is to use our release-utils in multiple places (e.g. in Casper).

We will discuss if we want to replace some of our manual written utilities by existing npm packages. But to avoid breaking everything, we do it iteratively. Our release utils works and was designed based on our needs. We've tested some release utility in the past, they were all not really satisfying. TBC...
2019-03-12 21:53:32 +01:00
Hannah Wolfe
3f9137903e Published new versions
- @tryghost/pretty-cli@1.2.0
2019-03-12 13:39:12 +00:00
Hannah Wolfe
a929b6a0f9 Added full suite of log functions
- matches logging in ignition: https://github.com/TryGhost/Ignition/blob/master/lib/logging/PrettyStream.js#L11
- so that it's possible to add log lines to our CLI tools that have a consistent format
2019-03-10 15:08:53 +00:00
Hannah Wolfe
93dbcef099 🛠 Moved Pretty-CLI into Ghost-Utils repo
- this was originally created in the slimer repo, as that's where it was first used
- it's also used in migrate, should be used in gscan, and hopefully eventually, will also be part of Ghost-CLI
- therefore, it belongs somewhere more general
2019-03-10 14:00:05 +00:00