Commit Graph

20 Commits

Author SHA1 Message Date
Naz
8520c8a746 Published new versions
- @tryghost/adapter-manager@0.2.18
 - @tryghost/bootstrap-socket@0.2.13
 - @tryghost/config-url-helpers@0.1.3
 - @tryghost/constants@0.1.12
 - @tryghost/errors@0.2.17
 - @tryghost/image-transform@1.0.17
 - @tryghost/job-manager@0.8.11
 - @tryghost/limit-service@0.6.5
 - @tryghost/moleculer-service-from-class@0.2.21
 - @tryghost/mw-session-from-token@0.1.26
 - @tryghost/package-json@1.0.6
 - @tryghost/pretty-cli@1.2.22
 - @tryghost/promise@0.1.13
 - @tryghost/release-utils@0.7.1
 - @tryghost/security@0.2.13
 - @tryghost/session-service@0.1.28
 - @tryghost/settings-path-manager@0.1.2
 - @tryghost/vhost-middleware@1.0.19
 - @tryghost/zip@1.1.18
2021-10-22 16:01:20 +04:00
Daniel Lockyer
81f566b44a Added codecov.io coverage uploader to CI
refs linear.app/tryghost/issue/CORE-74/improve-the-test-situation

- this commit adds the codecov GitHub Action into CI so we can upload
  coverage reports
- the coverage files need to be in XML for them to work with
  codecov, so this commit also adds cobertura (XML) as a reporter
2021-10-20 11:56:20 +02:00
Renovate Bot
ebe62e27c1 Update dependency mocha to v9.1.3 2021-10-15 08:26:58 +00:00
Renovate Bot
dee321eebc Update dependency c8 to v7.10.0 2021-10-06 23:39:01 +00:00
Naz
8f4c4f66b5 Published new versions
- @tryghost/adapter-manager@0.2.16
 - @tryghost/bootstrap-socket@0.2.11
 - @tryghost/config-url-helpers@0.1.2
 - @tryghost/constants@0.1.10
 - @tryghost/errors@0.2.15
 - @tryghost/image-transform@1.0.15
 - @tryghost/job-manager@0.8.9
 - @tryghost/limit-service@0.6.3
 - @tryghost/moleculer-service-from-class@0.2.19
 - @tryghost/mw-session-from-token@0.1.24
 - @tryghost/package-json@1.0.4
 - @tryghost/pretty-cli@1.2.20
 - @tryghost/promise@0.1.11
 - @tryghost/release-utils@0.6.17
 - @tryghost/security@0.2.11
 - @tryghost/session-service@0.1.26
 - @tryghost/settings-path-manager@0.1.0
 - @tryghost/tpl@0.1.5
 - @tryghost/vhost-middleware@1.0.17
 - @tryghost/zip@1.1.16
2021-09-30 19:23:46 +02:00
Renovate Bot
81bb6465fb Update dependency mocha to v9.1.2 2021-09-27 01:04:25 +00:00
Renovate Bot
4a1da452e9 Update Test & linting packages 2021-09-22 14:29:23 +00:00
Naz
b428648665 Published new versions
- @tryghost/adapter-manager@0.2.15
 - @tryghost/bootstrap-socket@0.2.10
 - @tryghost/config-url-helpers@0.1.1
 - @tryghost/constants@0.1.9
 - @tryghost/errors@0.2.14
 - @tryghost/image-transform@1.0.14
 - @tryghost/job-manager@0.8.8
 - @tryghost/limit-service@0.6.2
 - @tryghost/moleculer-service-from-class@0.2.18
 - @tryghost/mw-session-from-token@0.1.23
 - @tryghost/package-json@1.0.3
 - @tryghost/pretty-cli@1.2.19
 - @tryghost/promise@0.1.10
 - @tryghost/release-utils@0.6.16
 - @tryghost/security@0.2.10
 - @tryghost/session-service@0.1.25
 - @tryghost/tpl@0.1.4
 - @tryghost/vhost-middleware@1.0.16
 - @tryghost/zip@1.1.15
2021-09-22 11:59:35 +02:00
Renovate Bot
ff5ee78825 Update dependency c8 to v7.9.0 2021-09-10 04:03:35 +00:00
Renovate Bot
2b7e2676eb Update dependency c8 to v7.8.0 2021-07-28 17:56:14 +00:00
Renovate Bot
ec7805b7f0 Pin dependency c8 to 7.7.3 2021-06-17 13:57:17 +00:00
Hannah Wolfe
d259fcc4c6 Published new versions
- @tryghost/config-url-helpers@0.1.0
2021-06-17 14:55:21 +01:00
Hannah Wolfe
5b43d82742 Improved types in config-url-helpers 2021-06-17 13:53:09 +01:00
Hannah Wolfe
eb829a050b Prepared config-url-helpers for their intended use
- added getSubdir, getSiteUrl and getAdminUrl methods from url-utils
- refactored them so they are designed to be bound by nconf
- exposed a bindAll method
- moved over the tests and refactor from a class instance to nconf bindings
2021-06-17 11:41:50 +01:00
Sam Lord
320e689ad4 Published new versions
- @tryghost/adapter-manager@0.2.14
 - @tryghost/config-url-helpers@0.0.1
 - @tryghost/errors@0.2.13
 - @tryghost/image-transform@1.0.13
 - @tryghost/moleculer-service-from-class@0.2.17
 - @tryghost/mw-session-from-token@0.1.22
 - @tryghost/package-json@1.0.2
 - @tryghost/session-service@0.1.24
 - @tryghost/tpl@0.1.3
2021-06-17 10:50:39 +01:00
Hannah Wolfe
3927c9002c Fixed merge error for deduplicate subdirectory
- tried to move history and fucked up git filter-repo :(
2021-06-16 20:22:06 +01:00
Hannah Wolfe
f98bcf150c Merged deduplicate subdirectory util from SDK/url-utils 2021-06-16 17:55:14 +01:00
Hannah Wolfe
0d965276a1 Added new config-url-helpers package
- This will contain a small number of helpers for getting correctly formatted urls from config
2021-06-16 17:54:30 +01:00
Kevin Ansfield
523278b295 🐛 Fixed subdirectory handling and deduplication
no issue

Ghost's relative->absolute handling is a little strange when the rootUrl includes a subdirectory. Root-relative paths such as /content/image.jpg are actually treated as subdirectory-relative. This means that it's possible to migrate from a root config to a subdirectory config without migrating data in the database, _however_ that means that the database will now have a mix of path styles (/content/image.png and /subdir/content/image.png). To handle this when all root-relative paths are treated as subdir-relative we have to rely on subdirectory deduplication.

- updates tests to reflect correct subdirectory handling according to the above rules
- fixes missing subdirectories when root urls contain subdirectories but relative paths do not
- fixes subdirectory deduplication when the supplied url/path does not have a trailing slash but matches the root url's subdirectory
2019-10-02 12:33:34 +01:00
Kevin Ansfield
86343f028b Refactored url-utils (#141)
no issue

- extracted most standalone util functions into separate files+tests
- switched the main `UrlUtils` function into a class (we had mixed uses of the returned object previously as both `urlUtils()` and `new UrlUtils()` - the class makes it obvious that the `new` keyword is required)
- removed some unnecessary use of lodash and switched to using `URL` in place of `url` so that the package can have parity across node+browser without needing an additional package bundled in
2019-08-12 08:57:13 +01:00