Skip to content

Commit

Permalink
Merge pull request #55 from anolilab/alpha
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions-shell <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
prisis and github-actions[bot] committed Sep 4, 2024
2 parents 0ed69e4 + dbf55d8 commit 6959f73
Show file tree
Hide file tree
Showing 29 changed files with 2,951 additions and 2,453 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ README.md
verify-node-version.cjs

packem.config.ts
taze.config.js
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ body:
id: "environment-info"
attributes:
label: "Environment Info"
description: "Output of `npx envinfo --system --binaries --browsers --monorepos --npmPackages '{semantic-release*,@semantic-release/*}'`"
description: "Output of `npx envinfo --system --binaries --browsers --monorepos --npmPackages '{@anolilab/*,@visulima/*}'`"
render: "shell"
placeholder: |
System:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
wait-interval: 60 # seconds
running-workflow-name: "Build Package" # wait for all other checks to complete
allowed-conclusions: "success,skipped" # all other checks must pass, being skipped or cancelled is not sufficient
allowed-conclusions: "success,neutral,skipped" # all other checks must pass, being skipped or cancelled is not sufficient

- name: "Git checkout"
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

. "$(dirname "$0")/../common.sh"
. "$(dirname "$0")/common.sh"

# The hook should exit with non-zero status after issuing
# an appropriate message if it wants to stop the commit.
Expand Down
2 changes: 1 addition & 1 deletion .husky/post-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

. "$(dirname "$0")/../common.sh"
. "$(dirname "$0")/common.sh"

# The hook should exit with non-zero status after issuing
# an appropriate message if it wants to stop the commit.
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

. "$(dirname "$0")/../common.sh"
. "$(dirname "$0")/common.sh"

# The hook should exit with non-zero status after issuing
# an appropriate message if it wants to stop the commit.
Expand Down
2 changes: 1 addition & 1 deletion .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

. "$(dirname "$0")/../common.sh"
. "$(dirname "$0")/common.sh"

echo --------------------------------------------
echo Starting Git hook: prepare-commit-msg
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## [1.0.5-alpha.2](https://github.com/anolilab/unplugin-favicons/compare/v1.0.5-alpha.1...v1.0.5-alpha.2) (2024-08-22)

### Bug Fixes

* **deps:** update dependencies ([7acab86](https://github.com/anolilab/unplugin-favicons/commit/7acab86ecf81476172873904729ce2cb94635818))
* fixed depracation warning on unplugin, fixed injection of html code for astro ([54eab40](https://github.com/anolilab/unplugin-favicons/commit/54eab407903ad69c41132e685e5ff3e23dae79c3))

### Continuous Integration

* added neutral to allowed ([4a266cd](https://github.com/anolilab/unplugin-favicons/commit/4a266cde8d858f4b7f588c278e8bf2672281a249))
* cs fixes, added audit message GHSA-952p-6rrq-rcjv to ignore ([0b909bf](https://github.com/anolilab/unplugin-favicons/commit/0b909bf22eb8ca43f2ac2ac29d50ce57d33eea35))

## [1.0.5-alpha.1](https://github.com/anolilab/unplugin-favicons/compare/v1.0.4...v1.0.5-alpha.1) (2024-08-06)

### Bug Fixes

* changed find-cache-dir & read-pkg-up to [@visulima](https://github.com/visulima) alternative ([#52](https://github.com/anolilab/unplugin-favicons/issues/52)) ([0da3949](https://github.com/anolilab/unplugin-favicons/commit/0da39499aca4a0b21a16514a500c3d8d3670ac14))

## [1.0.4](https://github.com/anolilab/unplugin-favicons/compare/v1.0.3...v1.0.4) (2024-08-06)

### Bug Fixes
Expand Down
28 changes: 14 additions & 14 deletions __tests__/core/utils/oracle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import { beforeEach, describe, expect, it, vi } from "vitest";

import Oracle from "../../../src/core/utils/oracle"; // You'll need a mocking library to mock the imports

const { readPackageUpSync } = vi.hoisted(() => {
return { readPackageUpSync: vi.fn() };
const { findPackageJsonSync } = vi.hoisted(() => {
return { findPackageJsonSync: vi.fn() };
});

vi.mock("read-pkg-up", async (importOriginal) => {
vi.mock("@visulima/package", async (importOriginal) => {
// eslint-disable-next-line @typescript-eslint/naming-convention,no-underscore-dangle,@typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-assignment
const module_ = (await importOriginal()) as any;

// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return {
...module_,
readPackageUpSync,
findPackageJsonSync,
};
});

Expand All @@ -26,7 +26,7 @@ describe("oracle", () => {
it("should guess app name from package.json", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({ packageJson: { name: "my-app" } });
findPackageJsonSync.mockReturnValueOnce({ packageJson: { name: "my-app" } });

const oracle = new Oracle();
const result = oracle.guessAppName();
Expand All @@ -37,7 +37,7 @@ describe("oracle", () => {
it("should return undefined if no app name in package.json", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({ packageJson: {} });
findPackageJsonSync.mockReturnValueOnce({ packageJson: {} });

const oracle = new Oracle();
const result = oracle.guessAppName();
Expand All @@ -48,7 +48,7 @@ describe("oracle", () => {
it("should guess description from package.json", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({ packageJson: { description: "A sample app" } });
findPackageJsonSync.mockReturnValueOnce({ packageJson: { description: "A sample app" } });

const oracle = new Oracle();
const result = oracle.guessDescription();
Expand All @@ -59,7 +59,7 @@ describe("oracle", () => {
it("should return undefined if no description in package.json", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({ packageJson: {} });
findPackageJsonSync.mockReturnValueOnce({ packageJson: {} });

const oracle = new Oracle();
const result = oracle.guessDescription();
Expand All @@ -70,7 +70,7 @@ describe("oracle", () => {
it("should guess developer from package.json when author is a string", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({ packageJson: { author: "John Doe <john@example.com> (http://example.com)" } });
findPackageJsonSync.mockReturnValueOnce({ packageJson: { author: "John Doe <john@example.com> (http://example.com)" } });

const oracle = new Oracle();
const result = oracle.guessDeveloper();
Expand All @@ -85,7 +85,7 @@ describe("oracle", () => {
it("should guess developer from package.json when author is an object", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({ packageJson: { author: { email: "john@example.com", name: "John Doe", url: "http://example.com" } } });
findPackageJsonSync.mockReturnValueOnce({ packageJson: { author: { email: "john@example.com", name: "John Doe", url: "http://example.com" } } });

const oracle = new Oracle();
const result = oracle.guessDeveloper();
Expand All @@ -100,7 +100,7 @@ describe("oracle", () => {
it("should guess developer from package.json when maintainers are present", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({
findPackageJsonSync.mockReturnValueOnce({
packageJson: { maintainers: [{ email: "jane@example.com", name: "Jane Doe", url: "http://example.com/jane" }] },
});

Expand All @@ -117,7 +117,7 @@ describe("oracle", () => {
it("should return undefined for developer if no author or maintainers in package.json", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({ packageJson: {} });
findPackageJsonSync.mockReturnValueOnce({ packageJson: {} });

const oracle = new Oracle();
const result = oracle.guessDeveloper();
Expand All @@ -132,7 +132,7 @@ describe("oracle", () => {
it("should guess version from package.json", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({ packageJson: { version: "1.0.0" } });
findPackageJsonSync.mockReturnValueOnce({ packageJson: { version: "1.0.0" } });

const oracle = new Oracle();
const result = oracle.guessVersion();
Expand All @@ -143,7 +143,7 @@ describe("oracle", () => {
it("should return undefined if no version in package.json", () => {
expect.assertions(1);

readPackageUpSync.mockReturnValueOnce({ packageJson: {} });
findPackageJsonSync.mockReturnValueOnce({ packageJson: {} });

const oracle = new Oracle();
const result = oracle.guessVersion();
Expand Down
Loading

0 comments on commit 6959f73

Please sign in to comment.