adapt-cli 3.3.2 → 3.3.5

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.
@@ -7,19 +7,24 @@ jobs:
7
7
  release:
8
8
  name: Release
9
9
  runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write # to be able to publish a GitHub release
12
+ issues: write # to be able to comment on released issues
13
+ pull-requests: write # to be able to comment on released pull requests
14
+ id-token: write # to enable use of OIDC for trusted publishing and npm provenance
10
15
  steps:
11
16
  - name: Checkout
12
- uses: actions/checkout@v2
17
+ uses: actions/checkout@v4
13
18
  with:
14
19
  fetch-depth: 0
15
20
  - name: Setup Node.js
16
- uses: actions/setup-node@v2
21
+ uses: actions/setup-node@v4
17
22
  with:
18
23
  node-version: 'lts/*'
24
+ registry-url: https://registry.npmjs.org
19
25
  - name: Install dependencies
20
26
  run: npm ci
21
27
  - name: Release
22
28
  env:
23
29
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25
30
  run: npx semantic-release
@@ -289,6 +289,8 @@ export default class Plugin {
289
289
  return await perform()
290
290
  }
291
291
  const getMatchingVersion = async () => {
292
+ if (!this.isPresent) return null
293
+
292
294
  if (this.isLocalSource) {
293
295
  const info = this.projectVersion ? this._projectInfo : this._sourceInfo
294
296
  const satisfiesConstraint = !this.hasValidRequestVersion || semver.satisfies(info.version, this.requestedVersion, semverOptions)
@@ -297,8 +299,6 @@ export default class Plugin {
297
299
  return info.version
298
300
  }
299
301
 
300
- if (!this.isPresent) return null
301
-
302
302
  // check if the latest version is compatible
303
303
  const satisfiesConstraint = !this.hasValidRequestVersion || semver.satisfies(this._sourceInfo.version, this.requestedVersion, semverOptions)
304
304
  const satisfiesFramework = semver.satisfies(framework, this.frameworkVersion, semverOptions)
@@ -336,9 +336,10 @@ export default class Plugin {
336
336
  async getType () {
337
337
  if (this._type) return this._type
338
338
  const info = await this.getInfo()
339
+ if (!info) return null
339
340
  const foundAttributeType = PLUGIN_TYPES.find(type => info[type])
340
341
  const foundKeywordType = info.keywords
341
- .map(keyword => {
342
+ ?.map(keyword => {
342
343
  const typematches = PLUGIN_TYPES.filter(type => keyword?.toLowerCase()?.includes(type))
343
344
  return typematches.length ? typematches[0] : null
344
345
  })
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "adapt-cli",
3
- "version": "3.3.2",
3
+ "version": "3.3.5",
4
4
  "description": "Command line tools for Adapt",
5
5
  "main": "./lib/api.js",
6
+ "repository": "github:adaptlearning/adapt-cli",
6
7
  "type": "module",
7
8
  "dependencies": {
8
9
  "async": "^3.2.3",
@@ -30,18 +31,14 @@
30
31
  "adapt": "./bin/adapt.js"
31
32
  },
32
33
  "devDependencies": {
33
- "eslint": "^7.31.0",
34
+ "@semantic-release/git": "^10.0.1",
35
+ "conventional-changelog-eslint": "^6.0.0",
34
36
  "eslint-config-standard": "^16.0.3",
35
37
  "eslint-plugin-import": "^2.23.4",
36
38
  "eslint-plugin-node": "^11.1.0",
37
39
  "eslint-plugin-promise": "^5.1.0",
38
- "@semantic-release/commit-analyzer": "^9.0.2",
39
- "@semantic-release/git": "^10.0.1",
40
- "@semantic-release/github": "^8.0.5",
41
- "@semantic-release/npm": "^9.0.1",
42
- "@semantic-release/release-notes-generator": "^10.0.3",
43
- "conventional-changelog-eslint": "^3.0.9",
44
- "semantic-release": "^19.0.3"
40
+ "eslint": "^7.31.0",
41
+ "semantic-release": "^25.0.2"
45
42
  },
46
43
  "release": {
47
44
  "plugins": [