Commit Graph

103 Commits

Author SHA1 Message Date
Daniel Lockyer
d1c58466b5 Updated repository links
no issue

- this repo changes from `master` to `main` a while back, but the
  repository links needed updating too
2021-10-01 14:34:06 +01: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
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
Daniel Lockyer
939d4d9591 Published new versions
- @tryghost/package-json@1.0.1
 - @tryghost/tpl@0.1.2
2021-06-15 14:10:54 +01:00
Renovate Bot
f248f0d347 Update dependency c8 to v7.7.3 2021-06-14 00:31:49 +00:00
Hannah Wolfe
9eed5d69ef Published new versions
- @tryghost/package-json@1.0.0
 - @tryghost/tpl@0.1.1
2021-06-09 15:50:58 +01:00
Hannah Wolfe
1daa6eda61 Improved typing in package-json
- fixed type warnings
- introduced explicit use of bluebird to help with type warnings and also make it clear when we're actually using Bluebird features
2021-06-09 15:44:04 +01:00
Hannah Wolfe
93e4577caf Removed class pattern
- removed the class pattern in the simplest possible way
- have package-json expose only the public methods
- move parse to an independent, not public file so that we can test it independently still
2021-06-09 14:39:41 +01:00
Hannah Wolfe
dd129e0920 Removed use of i18n in package-json
- We are going to get rid of the internal i18n tool because it doesn't solve a real use case
- Instead, we have a new tpl utility that does basic string interpolation
- This makes this module less complex as it no longer requires dependency injection to work
2021-06-09 14:10:04 +01:00
Hannah Wolfe
b06e2a4577 Published new versions
- @tryghost/adapter-manager@0.2.13
 - @tryghost/bootstrap-socket@0.2.9
 - @tryghost/constants@0.1.8
 - @tryghost/errors@0.2.12
 - @tryghost/image-transform@1.0.12
 - @tryghost/job-manager@0.8.7
 - @tryghost/limit-service@0.6.1
 - @tryghost/moleculer-service-from-class@0.2.16
 - @tryghost/mw-session-from-token@0.1.21
 - @tryghost/package-json@0.1.2
 - @tryghost/pretty-cli@1.2.18
 - @tryghost/promise@0.1.9
 - @tryghost/release-utils@0.6.15
 - @tryghost/security@0.2.9
 - @tryghost/session-service@0.1.23
 - @tryghost/tpl@0.1.0
 - @tryghost/vhost-middleware@1.0.15
 - @tryghost/zip@1.1.14
2021-06-09 12:10:10 +01:00
Hannah Wolfe
f2b1d37cd4 Renamed package-json tests to use .test.js pattern
- all our modules use .test.js instead of the _spec.js pattern we use in Ghost
- updated for consistency
2021-06-09 11:57:52 +01:00
Renovate Bot
c72d090c97 Update dependency mocha to v9 2021-06-09 09:58:44 +00:00
Renovate Bot
80b56b8976 Update dependency sinon to v11 2021-05-24 22:37:15 +00:00
Naz
30f1194cf9 Published new versions
- @tryghost/limit-service@0.5.0
 - @tryghost/package-json@0.1.1
2021-05-07 18:23:35 +04:00
Daniel Lockyer
a81d90b126 Added c8 coverage to package-json tests
no issue

- this commit adds the c8 dependency to the `package-json`, and prepends
  it to the test alias so we can see the coverage in tests
- note: we're apparently already at 100%!
2021-05-07 12:36:36 +01:00
Naz
763875a15b Published new versions
- @tryghost/job-manager@0.8.5
 - @tryghost/limit-service@0.4.4
 - @tryghost/mw-session-from-token@0.1.20
 - @tryghost/package-json@0.1.0
 - @tryghost/session-service@0.1.21
 - @tryghost/zip@1.1.13
2021-05-07 15:00:07 +04:00
Daniel Lockyer
e0a966d6af Fixed package-json test requires
no issue

- these tests have just been extracted from Ghost so the paths are wrong
  and they're missing the global utils import
2021-05-06 15:16:29 +01:00
Daniel Lockyer
e74c682cba Added export for package-json library contents
no issue

- our code is already in the `lib` folder so we just need to export it
2021-05-06 15:16:29 +01:00
Daniel Lockyer
3f1462296e Added required dependencies for package-json
no issue

- this package has just been extracted from Ghost and we need to add the
  dependencies it uses into the `package.json`
2021-05-06 15:16:29 +01:00
Daniel Lockyer
d2d4bbe8ed Merged package-json files and history from TryGhost/Ghost 2021-05-06 15:16:29 +01:00
Daniel Lockyer
a0e2c4d45f Added initial package-json package
no issue

- this adds the templated package from Slimer ready for pulling the
  history in from Ghost
2021-05-06 15:16:29 +01:00
Daniel Lockyer
95cfa97747 Changed Error to IncorrectUsageError in package-json
no issue

- `Error` is very generic for this case and `IncorrectUsageError`
  will populate the resulting error with the correct error code
- the `message` was pulled out to its own statement so we can avoid long
  lines
2021-05-06 13:22:59 +01:00
Daniel Lockyer
eea93d55f4 Moved package-json wrapper outside implementation folder
no issue

- we're preparing the `package-json` lib to be extracted out of Ghost into
  its own package so moving the initialization wrapper outside of the
  folder makes the process a lot easier
2021-05-06 12:56:21 +01:00
Hannah Wolfe
e1b18aba2c Moved i18n to shared
refs 90ca836cb6

- i18n is used everywhere but only requires shared or external packages, therefore it's a good candidate for living in shared
- this reduces invalid requires across frontend and server, and lets us use it everywhere until we come up with a better option
2021-05-04 13:03:38 +01:00
Hannah Wolfe
90ca836cb6 Expanded requires of lib/common i18n and events
- Having these as destructured from the same package is hindering refactoring now
- Events should really only ever be used server-side
- i18n should be a shared module for now so it can be used everywhere until we figure out something better
- Having them seperate also allows us to lint them properly
2021-05-03 17:14:52 +01:00
Aileen Nowak
7f4d2bb06e Updated links to ghost.org sites
no issue

Follow-up task of the updated Ghost Docs structure. Updated links reflecting the new structure to prevent unnecessary 404s and redirects.
2021-01-20 09:59:45 +13:00
Thibaut Patel
bd3afeb112 Made the package-json module ready to be exported (#12451)
no issue
2020-12-10 11:37:43 +01:00
Daniel Lockyer
6d42c391c5 Added JSDoc comments into package-json lib 2020-11-25 11:29:04 +00:00
Daniel Lockyer
7f09052ba1 Reverted "Refactored remaining function in package-json lib to use async-await"
- this reverts commit 2be01e7cbd.
- reverting until I can figure out why the tests are broken
2020-11-25 10:57:55 +00:00
Daniel Lockyer
2be01e7cbd Refactored remaining function in package-json lib to use async-await
- this helps simplify the code and gets rid of Promise chaining
- apparently I can't easily use an async function within filter, so I've
  left it for now
2020-11-25 10:44:15 +00:00
Daniel Lockyer
0971506948 Refactored package-json lib to use more async-await
- this helps get rid of all the promise chaining and indentation,
  resulting in cleaner code
2020-11-25 09:19:35 +00:00
Daniel Lockyer
9d29686f6a Refactored package-json lib into a class
- this helps bring all the code together so we can extract it in the
  future
- turning it into a class also lets us easily inject the i18n instance
  and store it locally
2020-11-25 09:19:35 +00:00
Kukhyeon Heo
1d707b59a6 Removed global.Promise override (#12182)
closed #11943 

* Remove global.Promise
* Fix brute-knex bluebird error.
* Fix api-acceptance tests.
* Fix unit tests
2020-11-04 10:55:47 +00:00
Austin Burdine
e37d08b5d0 🔥 Added support for Node 14 2020-10-23 12:57:02 +01:00
naz
c4b6351a74 Fixed "no-shadow" linting error in server modules (#12287)
refs 143921948d

- Continuation of changes started in referenced commit
2020-10-20 12:02:56 +13:00
Hannah Wolfe
18ce837e9a Refactor common pattern in service files
- Use array destructuring
- Use @tryghost/errors
- Part of the big move towards decoupling, this gives visibility on what's being used where
- Biting off manageable chunks / fixing bits of code I'm refactoring for other reasons
2020-04-30 20:48:42 +01:00
Hannah Wolfe
3db4f8d331 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
d47df7ad46 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
134e069c1b Remove External Apps
- Apps are marked as removed in 3.0, never officially launched and have been deprecated for at least 2 years.
- We've slowly removed bits that got in our way or were insecure over time meaning they mostly didn't work
- This cleans up the remainder of the logic
- The tables should be cleaned up in a future major
2020-03-20 10:40:22 +00:00
Hannah Wolfe
8ccf7fd172 Revert "Remove Apps"
This reverts commit 20507b5dd5.
2020-03-20 08:58:26 +00:00
Hannah Wolfe
20507b5dd5 Remove Apps
- Apps are marked as removed in 3.0, never officially launched and have been deprecated for at least 2 years.
- We've slowly removed bits that got in our way or were insecure over time meaning they mostly didn't work
- This cleans up the remainder of the logic
- The tables should be cleaned up in a future major
2020-03-19 19:06:17 +00:00
Aileen Nowak
14e5ae93b3 Updated docs api links to be version-less 2019-07-25 15:17:23 +08:00
Aileen Nowak
53ef388321 Updated links to docs (#10941)
no issue
2019-07-22 18:17:50 +08:00
Hannah Wolfe
9ca92908ef Updated docs links to best equivalents (#10386)
* Updated docs links to best equivalents
   - Our documentation has been overhauled, this updates the all the old links sprinkled through Ghost
* Update integrity hash
2019-01-17 06:57:37 +00:00
kirrg001
cb03ca2529 Changed http to https links
no issue

- use https
- replace broken links e.g. docs.ghost.org/themes
2018-08-16 12:13:24 +02:00
kirrg001
847d4b2f01 Updated docs links
refs #9742

- Ghost 2.0 is coming
- all doc links in 1.0 must use concrete links e.g. docs.ghost.org/v1 or themes.ghost.org/v1.23.0/
- if we release Ghost 2.0, docs.ghost.org will show 2.0 docs
2018-07-20 23:49:16 +02:00
kirrg001
821db41992 🔥 Drop Node v4 Support
no issue

- support ends today
- see https://github.com/nodejs/Release
- removed `use strict`
2018-05-01 14:06:18 +02:00
kirrg001
69c1e2647d Moved zip folder, read csv and package-json to lib/fs
refs #9178, refs 849e97640f

- i've reconsidered, these modules belong to lib
- prettify package-json module
2017-12-14 22:07:53 +01:00