adapt-authoring-tags 1.3.2 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,17 @@
1
1
  name: Release
2
+
2
3
  on:
3
4
  push:
4
5
  branches:
5
6
  - master
6
7
 
8
+ permissions:
9
+ contents: write
10
+ issues: write
11
+ pull-requests: write
12
+ id-token: write
13
+ packages: write
14
+
7
15
  jobs:
8
16
  release:
9
- name: Release
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: write # to be able to publish a GitHub release
13
- issues: write # to be able to comment on released issues
14
- pull-requests: write # to be able to comment on released pull requests
15
- id-token: write # to enable use of OIDC for trusted publishing and npm provenance
16
- steps:
17
- - name: Checkout
18
- uses: actions/checkout@v3
19
- with:
20
- fetch-depth: 0
21
- - name: Setup Node.js
22
- uses: actions/setup-node@v3
23
- with:
24
- node-version: 'lts/*'
25
- - name: Update npm
26
- run: npm install -g npm@latest
27
- - name: Install dependencies
28
- run: npm install
29
- - name: Release
30
- env:
31
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32
- run: npx semantic-release
17
+ uses: adaptlearning/semantic-release-config/.github/workflows/release.yml@master
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-tags",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Module for managing tags",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-tags",
6
6
  "license": "GPL-3.0",
@@ -11,44 +11,18 @@
11
11
  "test": "node --test 'tests/**/*.spec.js'"
12
12
  },
13
13
  "devDependencies": {
14
+ "@adaptlearning/semantic-release-config": "^1.0.0",
14
15
  "adapt-authoring-server": "^2.1.0",
15
- "@semantic-release/git": "^10.0.1",
16
- "conventional-changelog-eslint": "^6.0.0",
17
- "semantic-release": "^25.0.2",
18
16
  "standard": "^17.1.0"
19
17
  },
20
18
  "release": {
21
- "plugins": [
22
- [
23
- "@semantic-release/commit-analyzer",
24
- {
25
- "preset": "eslint"
26
- }
27
- ],
28
- [
29
- "@semantic-release/release-notes-generator",
30
- {
31
- "preset": "eslint"
32
- }
33
- ],
34
- "@semantic-release/npm",
35
- "@semantic-release/github",
36
- [
37
- "@semantic-release/git",
38
- {
39
- "assets": [
40
- "package.json"
41
- ],
42
- "message": "Chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
43
- }
44
- ]
45
- ]
19
+ "extends": "@adaptlearning/semantic-release-config"
46
20
  },
47
21
  "dependencies": {
48
22
  "adapt-authoring-api": "^3.0.0"
49
23
  },
50
24
  "peerDependencies": {
51
- "adapt-authoring-core": "^2.0.0",
25
+ "adapt-authoring-core": "^3.0.0",
52
26
  "adapt-authoring-jsonschema": "^1.2.0",
53
27
  "adapt-authoring-mongodb": "^3.0.0"
54
28
  }
@@ -478,16 +478,16 @@ describe('TagsModule', () => {
478
478
  assert.equal(parentInsert.mock.calls.length, 1)
479
479
  })
480
480
 
481
- it('should pass through all arguments to find', async () => {
481
+ it('should pass through all arguments to findOne', async () => {
482
482
  const { instance } = createInstance()
483
- instance.find = mock.fn(async () => [{ _id: 'tag1', title: 'test' }])
483
+ instance.findOne = mock.fn(async () => ({ _id: 'tag1', title: 'test' }))
484
484
  const data = { title: 'test' }
485
485
  const options = { validate: false }
486
486
  const mongoOpts = { limit: 1 }
487
487
  await instance.insert(data, options, mongoOpts)
488
- const findArgs = instance.find.mock.calls[0].arguments
488
+ const findArgs = instance.findOne.mock.calls[0].arguments
489
489
  assert.equal(findArgs[0], data)
490
- assert.equal(findArgs[1], options)
490
+ assert.deepEqual(findArgs[1], { validate: false, strict: false })
491
491
  assert.equal(findArgs[2], mongoOpts)
492
492
  })
493
493
  })