graphiti 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 204d1a4f58e02729d7ce4f924845e1517a3cdd22e40399624b182bce2e41a48e
4
- data.tar.gz: 0246a34ea30c9f27a58be2ba507cc27a41ab6d478947425967758f2c528bbd52
3
+ metadata.gz: 4ac18e95dbeb97600ec5027bf94e58724e652f5c77dd0d83f122651a04b9676f
4
+ data.tar.gz: 4691d5f4f4e037e6d2d5100e84789ea53b6084d884e22bdf1f55b6a3a0e7981d
5
5
  SHA512:
6
- metadata.gz: 80f71ce21c23066cc5d362b62e292442d8850e598a6039d77580a094028e11716d72032921af12186b792730b61e3e94069a813debce308a728c6533c69df7c2
7
- data.tar.gz: fec525c3040ca87f939cdf879cbf469dde0d1c263845e54a3a01e29d7e79447bf2221af39026d9bc98aa6df826b0ce9068d9736d2f859313ec0b8f9b8c19f54a
6
+ metadata.gz: 36401cebf8a89402bdbafccf234a98d988df2f642ff00d4ee51030857ce98b008f91d3ca80b7f05e64a2a3ab79f872c225c1d79cf3d1c531e9ff61e74b4f7280
7
+ data.tar.gz: 73601e0ee6d54235a54c4db54baab90313e735ae81806520354a8f75890de6ec7fb3025952ed972f15fe493230a97a50a2e41e82b7f957739b21177355743479
@@ -101,3 +101,14 @@ jobs:
101
101
  bundler-cache: true
102
102
  - name: Run tests
103
103
  run: bundle exec rspec
104
+ publish:
105
+ name: Release
106
+ runs-on: ubuntu-latest
107
+ if: github.ref == 'refs/heads/master'
108
+ needs: [test]
109
+ steps:
110
+ - name: Dispatch Release
111
+ uses: benc-uk/workflow-dispatch@v1
112
+ with:
113
+ workflow: Generate New Release
114
+ token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Generate New Release
3
+
4
+ on:
5
+ workflow_dispatch:
6
+
7
+ jobs:
8
+ release:
9
+ name: Release
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v3
14
+ with:
15
+ submodules: true
16
+ persist-credentials: false
17
+ - name: Set up Ruby
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: "3.1"
21
+ - name: Build
22
+ run: |
23
+ gem install bundler
24
+ git submodule update --init --recursive
25
+ bundle install --jobs 4 --retry 3
26
+ - name: Setup Node.js
27
+ uses: actions/setup-node@v2
28
+ with:
29
+ node-version: 14
30
+ - name: Install Dependencies
31
+ run: yarn install --frozen-lockfile
32
+ - name: Release
33
+ env:
34
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35
+ GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
36
+ run: node_modules/.bin/semantic-release
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  /spec/reports/
8
8
  /gemfiles/*.lock
9
9
  /tmp/
10
+ node_modules
10
11
  .byebug_history
11
12
  spec/.rspec-examples
12
13
  spec/dummy/log/*
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ graphiti changelog
2
+
3
+ # [1.5.0](https://github.com/graphiti-api/graphiti/compare/v1.4.0...v1.5.0) (2024-03-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * add before_sideload hook ([#371](https://github.com/graphiti-api/graphiti/issues/371)) ([f68b61f](https://github.com/graphiti-api/graphiti/commit/f68b61ff09ec61ecf23acc5bc37d0accba14aeed))
9
+
1
10
  ## 1.4.0, Sun March 17th 2024
2
11
  Features:
3
12
  - [461](https://github.com/graphiti-api/graphiti/pull/461), [463](https://github.com/graphiti-api/graphiti/pull/463) Add support for Rails 7.1 + Ruby 3.2 + Ruby 3.3
@@ -15,6 +15,7 @@ module Graphiti
15
15
  attr_accessor :pagination_links
16
16
  attr_accessor :typecast_reads
17
17
  attr_accessor :raise_on_missing_sidepost
18
+ attr_accessor :before_sideload
18
19
 
19
20
  attr_reader :debug, :debug_models
20
21
 
@@ -43,6 +43,7 @@ module Graphiti
43
43
  parent_resource = @resource
44
44
  graphiti_context = Graphiti.context
45
45
  resolve_sideload = -> {
46
+ Graphiti.config.before_sideload&.call(graphiti_context)
46
47
  Graphiti.context = graphiti_context
47
48
  sideload.resolve(results, q, parent_resource)
48
49
  @resource.adapter.close if concurrent
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
data/package.json ADDED
@@ -0,0 +1,110 @@
1
+ {
2
+ "name": "graphiti",
3
+ "version": "1.4.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/graphiti-api/graphiti.git"
7
+ },
8
+ "license": "MIT",
9
+ "bugs": {
10
+ "url": "https://github.com/graphiti-api/graphiti/issues"
11
+ },
12
+ "homepage": "https://graphiti.dev",
13
+ "scripts": {
14
+ "semantic-release": "semantic-release"
15
+ },
16
+ "devDependencies": {
17
+ "semantic-release-rubygem": "^1.2.0",
18
+ "semantic-release": "^19.0.3",
19
+ "@semantic-release/changelog": "^6.0.1",
20
+ "@semantic-release/git": "^10.0.1"
21
+ },
22
+ "release": {
23
+ "branches": [
24
+ "master",
25
+ {
26
+ "name": "beta",
27
+ "prerelease": true
28
+ },
29
+ {
30
+ "name": "alpha",
31
+ "prerelease": true
32
+ }
33
+ ],
34
+ "plugins": [
35
+ [
36
+ "@semantic-release/commit-analyzer",
37
+ {
38
+ "releaseRules": [
39
+ {
40
+ "type": "*!",
41
+ "release": "major"
42
+ },
43
+ {
44
+ "type": "feat",
45
+ "release": "minor"
46
+ },
47
+ {
48
+ "type": "build",
49
+ "release": "patch"
50
+ },
51
+ {
52
+ "type": "ci",
53
+ "release": "patch"
54
+ },
55
+ {
56
+ "type": "chore",
57
+ "release": "patch"
58
+ },
59
+ {
60
+ "type": "docs",
61
+ "release": "patch"
62
+ },
63
+ {
64
+ "type": "refactor",
65
+ "release": "patch"
66
+ },
67
+ {
68
+ "type": "style",
69
+ "release": "patch"
70
+ },
71
+ {
72
+ "type": "test",
73
+ "release": "patch"
74
+ }
75
+ ],
76
+ "parserOpts": {
77
+ "noteKeywords": [
78
+ "BREAKING CHANGE",
79
+ "BREAKING CHANGES",
80
+ "BREAKING",
81
+ "BREAKING CHANGE!",
82
+ "BREAKING CHANGES!",
83
+ "BREAKING!"
84
+ ]
85
+ }
86
+ }
87
+ ],
88
+ "@semantic-release/release-notes-generator",
89
+ [
90
+ "@semantic-release/changelog",
91
+ {
92
+ "changelogTitle": "graphiti changelog",
93
+ "changelogFile": "CHANGELOG.md"
94
+ }
95
+ ],
96
+ "@semantic-release/github",
97
+ [
98
+ "@semantic-release/git",
99
+ {
100
+ "assets": [
101
+ "CHANGELOG.md"
102
+ ],
103
+ "message": "${nextRelease.version} CHANGELOG [skip ci]\n\n${nextRelease.notes}"
104
+ }
105
+ ]
106
+ ],
107
+ "debug": true,
108
+ "dryRun": false
109
+ }
110
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-17 00:00:00.000000000 Z
11
+ date: 2024-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-serializable
@@ -214,6 +214,7 @@ extra_rdoc_files: []
214
214
  files:
215
215
  - ".github/probots.yml"
216
216
  - ".github/workflows/ci.yml"
217
+ - ".github/workflows/release.yml"
217
218
  - ".gitignore"
218
219
  - ".rspec"
219
220
  - ".standard.yml"
@@ -339,6 +340,7 @@ files:
339
340
  - lib/graphiti/util/transaction_hooks_recorder.rb
340
341
  - lib/graphiti/util/validation_response.rb
341
342
  - lib/graphiti/version.rb
343
+ - package.json
342
344
  homepage: https://github.com/graphiti-api/graphiti
343
345
  licenses:
344
346
  - MIT
@@ -358,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
358
360
  - !ruby/object:Gem::Version
359
361
  version: '0'
360
362
  requirements: []
361
- rubygems_version: 3.5.3
363
+ rubygems_version: 3.3.7
362
364
  signing_key:
363
365
  specification_version: 4
364
366
  summary: Easily build jsonapi.org-compatible APIs