Skip to content

Commit 8f932da

Browse files
Address feedback and update CHNAGELOG and docs
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 5536ede commit 8f932da

File tree

4 files changed

+46
-12
lines changed

4 files changed

+46
-12
lines changed

CHANGELOG.rst

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,26 @@ v33.0.0 (next next, roadmap)
3434
of these in other summary plugins.
3535
See https://github.com/nexB/scancode-toolkit/issues/1745
3636

37+
v32.2.0 - (next, roadmap)
38+
-------------------------
39+
40+
- New and improved package/dependency data:
41+
- Added new attribute in DependentPackage `is_direct` to aid
42+
package resolution and dependency graph creation.
43+
- Added new attributes in PackageData: `is_private` and
44+
`is_virtual`. #3102 #3811
45+
https://github.com/nexB/scancode-toolkit/pull/3779
46+
47+
- Improved javascript package detection:
48+
- Add support for pnpm manifests and lockfiles #3766
49+
- Add support for npm, pnpm and yarn workspaces #3746
50+
- Improve resolved package and dependencies support in lockfiles for
51+
yarn.lock, package-lock.json, and pnpm. #3780
52+
- Add support for private packages. #3120
53+
- Add support for new dependency scopes across javascript
54+
- Lots of misc bugfixes in yarn and npm parsers.
55+
https://github.com/nexB/scancode-toolkit/pull/3779
56+
3757
- Improve cargo package detection support with various improvements
3858
and bugfixes:
3959
- Fix for parser crashing on cargo workspaces
@@ -43,14 +63,10 @@ v33.0.0 (next next, roadmap)
4363
- Better handle workspace data thorugh extra_data attribute
4464
See https://github.com/nexB/scancode-toolkit/pull/3783
4565

46-
- We now support parsing the Swift manifest JSON dump and the ``Package.resolved`` file https://github.com/nexB/scancode-toolkit/issues/2657.
47-
- Run the commands below on your local Swift project before running the scan.
48-
- ::
49-
50-
swift package dump-package > Package.swift.json
51-
- ::
52-
53-
swift package resolve
66+
- We now support parsing the Swift manifest JSON dump and the
67+
``Package.resolved`` file https://github.com/nexB/scancode-toolkit/issues/2657.
68+
Run the command below on your local Swift project before running the scan:
69+
`swift package dump-package > Package.swift.json && swift package resolve``
5470

5571
- New and updated licenses, including support for newly released
5672
SPDX license list versions:

docs/source/reference/available_package_parsers.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,24 @@ parsers in scancode-toolkit during documentation builds.
539539
- ``npm_shrinkwrap_json``
540540
- JavaScript
541541
- https://docs.npmjs.com/cli/v8/configuring-npm/npm-shrinkwrap-json
542+
* - pnpm pnpm-lock.yaml lockfile
543+
- ``*/pnpm-lock.yaml``
544+
- ``npm``
545+
- ``pnpm_lock_yaml``
546+
- JavaScript
547+
- https://github.com/pnpm/spec/blob/master/lockfile/6.0.md
548+
* - pnpm shrinkwrap.yaml lockfile
549+
- ``*/shrinkwrap.yaml``
550+
- ``npm``
551+
- ``pnpm_shrinkwrap_yaml``
552+
- JavaScript
553+
- https://github.com/pnpm/spec/blob/master/lockfile/4.md
554+
* - pnpm workspace yaml file
555+
- ``*/pnpm-workspace.yaml``
556+
- ``npm``
557+
- ``pnpm_workspace_yaml``
558+
- JavaScript
559+
- https://pnpm.io/pnpm-workspace_yaml
542560
* - yarn.lock lockfile v1 format
543561
- ``*/yarn.lock``
544562
- ``npm``
@@ -748,7 +766,7 @@ parsers in scancode-toolkit during documentation builds.
748766
- ``squashfs_disk_image``
749767
- None
750768
- https://en.wikipedia.org/wiki/SquashFS
751-
* - JSON dump of Package.swift created with ``swift package dump-package > Package.swift.json``
769+
* - JSON dump of Package.swift created with ``swift package dump-package &gt; Package.swift.json``
752770
- ``*/Package.swift.json``
753771
- ``swift``
754772
- ``swift_package_manifest_json``

src/packagedcode/npm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from packagedcode.utils import yield_dependencies_from_package_data
2626
from packagedcode.utils import yield_dependencies_from_package_resource
2727
from packagedcode.utils import update_dependencies_as_resolved
28-
from packagedcode.utils import is_path_pattern
28+
from packagedcode.utils import is_simple_path
2929
from packagedcode.utils import is_simple_path_pattern
3030
import saneyaml
3131

@@ -301,7 +301,7 @@ def get_workspace_members(cls, workspaces, codebase, workspace_root_path):
301301
for workspace_path in workspaces:
302302

303303
# Case 1: A definite path, instead of a pattern (only one package.json)
304-
if is_path_pattern(workspace_path):
304+
if is_simple_path(workspace_path):
305305
workspace_dir_path = os.path.join(workspace_root_path, workspace_path)
306306
workspace_member_path = os.path.join(workspace_dir_path, 'package.json')
307307
workspace_member = codebase.get_resource(path=workspace_member_path)

src/packagedcode/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def get_base_purl(purl):
278278
return PackageURL(**base_purl_mapping).to_string()
279279

280280

281-
def is_path_pattern(path):
281+
def is_simple_path(path):
282282
return '*' not in path
283283

284284

0 commit comments

Comments
 (0)