Skip to content

Add back types in a more sane way #31

@github-actions

Description

@github-actions

https://api.github.com/BrycensRanch/AuthIsForMe/blob/1111033ba86baacb8e52f33bca6579a243eedb31/frontend/src/pages/thanks.tsx#L69

		setLicenses(
			await Promise.all(
				[...Object.keys(dependencies), ...Object.keys(devDependencies)].map(async dep => {
					// TODO: Add back types in a more sane way
					let npmPackage: any;
					try {
						npmPackage = await ky.get(`https://registry.npmjs.org/${dep}`).json();
						const normalizedRepoURL = new URL(
							npmPackage.repository?.url.replace(/\.git$/, '').replace('git+', '') || `https://github.com/npm/${dep}`,
						);
						normalizedRepoURL.protocol = 'https';
						if (npmPackage.repository?.url && npmPackage.repository?.type === 'git') {
							const repoDefaultBranch = await getRepoDefaultBranch(normalizedRepoURL.href);
							console.log(normalizedRepoURL.href, repoDefaultBranch);
							// license = await ky

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions