Skip to content

Commit 8cf8fd3

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents e9bf843 + 288a370 commit 8cf8fd3

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

tools/make/lib/ls/pkgs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs/tools.mk
3737
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs/toposort.mk
3838
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs/tree.mk
3939
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs/types.mk
40+
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs/unpublished.mk
4041
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs/wasm.mk
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2024 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# RULES #
20+
21+
#/
22+
# Prints a list of all unpublished standalone packages.
23+
#
24+
# @param {string} [LIST_PKGS_STANDALONES_DIR] - absolute path of the directory from which to search for packages (default: source directory)
25+
#
26+
# @example
27+
# make list-pkgs-unpublished
28+
#
29+
# @example
30+
# make list-pkgs-unpublished LIST_PKGS_STANDALONES_DIR="$PWD/lib/node_modules/\@stdlib/utils"
31+
#/
32+
list-pkgs-unpublished:
33+
$(QUIET) pkgs=$$(make --no-print-directory list-pkgs-standalones | tr '\n' ' '); \
34+
unpublished_pkgs=""; \
35+
for pkg in $$pkgs; do \
36+
if [ "$${pkg#*_tools}" != "$$pkg" ]; then \
37+
continue; \
38+
fi; \
39+
if ! npm show $$pkg version >/dev/null 2>&1; then \
40+
unpublished_pkgs="$$unpublished_pkgs $$pkg"; \
41+
fi; \
42+
done; \
43+
echo "$$unpublished_pkgs"
44+
45+
.PHONY: list-pkgs-unpublished

0 commit comments

Comments
 (0)