Skip to content

Commit

Permalink
add more missing dependencies from yarn.lock files, including github …
Browse files Browse the repository at this point in the history
…tarballs and sha refs (CRW-4952)

Change-Id: Ibb4b0dce144040c593dc7f01e3dbcce4f679486d
Signed-off-by: Nick Boldt <[email protected]>
  • Loading branch information
nickboldt committed Oct 23, 2023
1 parent 62a51d2 commit 21d78fe
Show file tree
Hide file tree
Showing 7 changed files with 23,520 additions and 8,078 deletions.
5,005 changes: 4,901 additions & 104 deletions product/manifest/3.9.0/npm/manifest-npm-devspaces-code.txt

Large diffs are not rendered by default.

4,235 changes: 2,920 additions & 1,315 deletions product/manifest/3.9.0/npm/manifest-npm-devspaces-dashboard.txt

Large diffs are not rendered by default.

609 changes: 609 additions & 0 deletions product/manifest/3.9.0/npm/manifest-npm-devspaces-idea.txt

Large diffs are not rendered by default.

1,448 changes: 982 additions & 466 deletions product/manifest/3.9.0/npm/manifest-npm-devspaces-machineexec.txt

Large diffs are not rendered by default.

3,393 changes: 2,335 additions & 1,058 deletions product/manifest/3.9.0/npm/manifest-npm-devspaces-traefik.txt

Large diffs are not rendered by default.

16,867 changes: 11,747 additions & 5,120 deletions product/manifest/3.9.0/npm/manifest-npm.txt

Large diffs are not rendered by default.

41 changes: 26 additions & 15 deletions product/manifest/get-3rd-party-deps-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,34 +64,45 @@ devspaces-udi \
for LOCK_FILE in $LOCK_FILES; do
(( num = num + 1 ))
done
SINGLE_MANIFEST="${WORKSPACE}/${CSV_VERSION}/npm/manifest-npm-${d}.txt"
rm -fr "${SINGLE_MANIFEST}"
for LOCK_FILE in $LOCK_FILES; do
(( c = c + 1 ))
echo "[$c/$num] Processing $LOCK_FILE ..."
pushd ${LOCK_FILE/yarn.lock/} >/dev/null || exit 1
SINGLE_MANIFEST="${WORKSPACE}/${CSV_VERSION}/npm/manifest-npm-${d}.txt"
rm -fr ${SINGLE_MANIFEST}
yarn list --depth=0 | sed \
-e '/Done in/d' \
-e '/yarn list/d ' \
-e 's/[├──└│]//g' \
-e 's/^[ \t]*//' \
-e 's/^@//' \
-e "s/@/:/g" \
-e "s#^#${d}-container:${DS_VERSION}/#g" \
| sort -uV > ${SINGLE_MANIFEST}
pushd "${LOCK_FILE/yarn.lock/}" >/dev/null || exit 1
yarn list --depth=0 | sed \
-e '/Done in/d' \
-e '/yarn list/d ' \
-e 's/[├──└│]//g' \
-e 's/^[ \t]*//' \
-e 's/^@//' \
-e "s/@/:/g" \
-e "s#^#${d}-container:${CSV_VERSION}/#g" \
| sort -uV >> "${SINGLE_MANIFEST}"

# collect all resolved items too
grep -E "^ resolved \"" "$LOCK_FILE" | sed -r \
-e "s#^ resolved \"(https://registry.npmjs.org/|https://registry.yarnpkg.com/)(.+).tgz.*\"#${d}-container::${CSV_VERSION}/\2#" \
-e "s#^ resolved \"(.*https://)(github.com/.+)\"#${d}-container::${CSV_VERSION}/\2#" \
-e "s#/([^/]+)/-/#/#" \
-e "s#\@##" \
>> "${SINGLE_MANIFEST}"

cat ${SINGLE_MANIFEST} >> ${MANIFEST_FILE/.txt/-raw-unsorted.txt}
popd >/dev/null || exit 1
done
if [[ -f "$SINGLE_MANIFEST" ]]; then
sort -uV "${SINGLE_MANIFEST}" > "${SINGLE_MANIFEST}_"; mv "${SINGLE_MANIFEST}_" "${SINGLE_MANIFEST}"
cat "${SINGLE_MANIFEST}" >> "${MANIFEST_FILE/.txt/-raw-unsorted.txt}"
fi
done

#Cleanup
cd .. && rm -fr devspaces-images

echo "Sort and dedupe deps across the repos:"
cat ${MANIFEST_FILE/.txt/-raw-unsorted.txt} | sort -uV >> ${MANIFEST_FILE}
sort -uV "${MANIFEST_FILE/.txt/-raw-unsorted.txt}" >> ${MANIFEST_FILE}
echo "" >> ${MANIFEST_FILE}
rm -rf ${MANIFEST_FILE/.txt/-raw-unsorted.txt}
rm -rf "${MANIFEST_FILE/.txt/-raw-unsorted.txt}"

##################################

Expand Down

0 comments on commit 21d78fe

Please sign in to comment.