The Wayback Machine - https://web.archive.org/web/20220531221505/https://github.com/TryGhost/Ghost/commits/main
Skip to content
Permalink
main
Switch branches/tags

Commits on May 31, 2022

  1. Added getLazyRelation model helper method (#14943)

    closes TryGhost/Team#1626
    
    - getLazyRelation is a safer shorthand for `model.related('relationName').fetch()`
    - prevents doing a `fetch` operation on a relation that is already loaded, which can cause issues when `formatOnWrite` has a custom implementation
    - uses the already loaded relation if it exists, or loads the relation
    - doesn't reload if already loaded
    - reload is forceable using the forceRefresh option
    SimonBackx committed May 31, 2022

Commits on May 30, 2022

  1. Fixed detection of Windows environment when connecting to SQLite temp DB

    fixes TryGhost/Toolbox#284
    
    - this section of code rewrites `/tmp` in the SQlite filename to the
      temp dir
    - the fix was only intended for Windows environments, because they
      typically don't have a `/tmp` dir
    - this commit adds a `process.platform` check for Windows
    - it also moves the code into the DB connection file instead of the
      config lib
    daniellockyer committed May 30, 2022
  2. Added possible fix for random test timeouts

    no issue
    
    Some tests timeout for an unknown reason. This commit adds some missing awaits for async test methods (that don't perform any async operation, but are marked as async).
    SimonBackx committed May 30, 2022
  3. v5.1.1

    daniellockyer committed May 30, 2022
  4. Updated Admin to v5.1.1

    daniellockyer committed May 30, 2022
  5. Update metascraper

    renovate-bot committed May 30, 2022

Commits on May 27, 2022

  1. v5.1.0

    daniellockyer committed May 27, 2022
  2. Updated Admin to v5.1.0

    daniellockyer committed May 27, 2022
  3. 🎨 Reduced favicon requirements and added image formatting (#14918)

    fixes TryGhost/Team#1652
    fixes #13319
    
    **Image formatting**
    Added support for changing the format of images via the `handle-image-sizes` middleware (e.g. format SVG to png, jpeg, webp)
    
    This change was required:
    - Not all browsers support SVG favicons, so we need to convert them to PNGs
    - We can't fit image resizing and formatting in the `serve-favicon` middleware: we need to store the resized image to avoid resizing on every request. This system was already present in the `handle-image-sizes` middleware.
    
    To format an uploaded image:
    - Original URL: https://localhost/blog/content/images/2022/05/giphy.gif
    - To resize: https://localhost/blog/content/images/size/w256h256/2022/05/giphy.gif (already supported)
    - To resize and format to webp: https://localhost/blog/content/images/size/w256h256/format/webp/2022/05/giphy.gif
    - Animations are preserved when converting Gifs to Webp and in reverse, and also when only resizing (#13319)
    
    **Favicons**
    - Custom favicons are no longer served via `/favicon.png` or `/favicon.ico` (only for default favicon), but use their full path
    - Added support for uploading more image extensions in Ghost as a favicon: .jpg, .jpeg, .gif, .webp and .svg are now supported (already supported .png and .ico).
    - File extensions other than jpg/jpeg, png, or ico will always get transformed to the image/png format to guarantee browser support (webp and svg images are not yet supported as favicons by all browsers).
    
    For all image formats, other than .ico files:
    - Allowed to upload images larger than 1000px in width and height, they will get cropped to 256x256px.
    - Allowed uploading favicons that are not square. They will get cropped automatically.
    - Allowed to upload larger files, up to 20MB (will get served at a lower file size after being resized)
    
    For .svg files:
    - The minimum size of 60x60px is no longer required.
    
    For .ico files:
    - The file size limit is increased to 200kb (coming from 100kb)
    SimonBackx committed May 27, 2022
  4. 🐛 Fixed reading time for RTL languages

    closes: #14365
    closes: TryGhost/SDK#366
    closes: TryGhost/SDK#389
    refs: TryGhost/SDK#431
    
    - our word count helper has been updated to handle RTL languages
    - this should also fix the reading time as it uses the same underlying function
    
    Co-authored-by: Emmanuel-Melon <emmanuelgatwech@gmail.com>
    ErisDS and Emmanuel-Melon committed May 27, 2022
  5. Allow page to be used as post in dynamic routing

    closes: #10042
    closes: #14206
    
    - the fact that pages are exposed as .page in dynamic routing has never played nicely
    - this fix changes nothing in the tests - which shows this was never a covered case
    - ideally I should add some tests, but for now this tiny change should prevent a lot of dynamic routing pain
    - note, it doesn't remove .page, it just adds .post, so both work
    ErisDS committed May 27, 2022
  6. Removed completed TODO:

    refs: 4fa412c
    
    - this was done in the referenced commit
    ErisDS committed May 27, 2022
  7. Added inviting user's email address as the reply-to address for staff…

    … invites
    
    closes TryGhost/Team#1501
    
    - Staff invites previously came from the default site from-address, which is often a noreply
    matthanley committed May 27, 2022
  8. 🐛 Fixed gscan not detecting issues in folders

    refs: https://forum.ghost.org/t/gscan-not-picking-up-some-products-incompatibilities-for-5-0/30394/4
    closes: TryGhost/Team#1653
    
    - gscan wasn't running the new linter-based rules on anything in a folder
    ErisDS committed May 27, 2022

Commits on May 26, 2022

  1. Cleaned snap files (#14921)

    - This PR was created by deleting all .snap files & running the tests
    - The result is that all tests that have been removed or renamed have had their now-unused snaps deleted
    ErisDS committed May 26, 2022
  2. Merged v5.0.2 into main

    v5.0.2
    matthanley committed May 26, 2022
  3. v5.0.2

    daniellockyer committed May 26, 2022
  4. Updated Admin to v5.0.2

    daniellockyer committed May 26, 2022
  5. Removed GA feature flags (#14915)

    refs TryGhost/Team#1616
    
    - Removed all GA feature flags
    - Removed `tweetGridCard` alpha flag
    - Changes to `members-api` and `members-importer` packages: TryGhost/Members@@tryghost/members-api@8.1.1...@tryghost/members-api@8.1.2
    SimonBackx committed May 26, 2022
  6. Removed subscriber-related webhook fixtures

    refs TryGhost/Toolbox#308
    refs 0f5c22a
    
    - There is no concept of "subscriber" in the codebase any longer. Keeping removed webhooks around does not make sense
    naz committed May 26, 2022
  7. Removed outdated usecase from documentation

    no issue
    
    - There is no concept of single author in the codebase, so having it documented doesn't make sense
    naz committed May 26, 2022
  8. Fixed typo

    naz committed May 26, 2022

Commits on May 25, 2022

  1. Update metascraper to v5.29.6

    renovate-bot authored and renovate[bot] committed May 25, 2022
  2. Removed unused getNewsletterRelations method

    refs #14870
    refs TryGhost/Members#400
    
    - Since the ref'd PRs, this method is no longer used
    matthanley committed May 25, 2022

Commits on May 24, 2022

  1. v5.0.1

    daniellockyer committed May 24, 2022
  2. Updated Admin to v5.0.1

    daniellockyer committed May 24, 2022
  3. Included monthly_price,yearly_price&benefits defaults for Content API (

    …#14912)
    
    
    We have to update the output serializer to only clean includes for the
    Admin API, so that these includes aren't stripped for not being in the
    original include query param.
    
    This also rejigs the other Content API only logic to sit together in
    the input serializer.
    allouis committed May 24, 2022
  4. Updated settings API to return all settings in edit endpoint (#14889)

    refs TryGhost/Team#1650
    
    Since we introduced calculated settings, we need to return all settings when editing a setting, because those calculated settings can change.
    
    - When editing settings, return all the settings. Previously we didn't include the calculated settings (which caused issues with admin not having up to date values for those)
    - Updated Stripe <head> script to be injected based on the calculated settings
    
    Required for TryGhost/Admin#2405
    SimonBackx committed May 24, 2022
Older