Skip to content

Commit

Permalink
Update resources
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoalh committed Oct 15, 2024
1 parent 5b32902 commit 64992a0
Show file tree
Hide file tree
Showing 24 changed files with 910 additions and 525 deletions.
87 changes: 45 additions & 42 deletions .dnt.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
import { transform, type TransformOutput } from "DNT/transform";
import { copy as fsCopy } from "STD/fs/copy";
import { emptyDir } from "STD/fs/empty-dir";
import { ensureDir } from "STD/fs/ensure-dir";
import { walk as readDir, type WalkEntry } from "STD/fs/walk";
import { dirname as pathDirname } from "node:path";
const pathsMain: WalkEntry[] = await Array.fromAsync(readDir("."));
const transformResult: TransformOutput = await transform({
entryPoints: ["mod.ts"],
mappings: {},
shims: [],
target: "Latest"
import {
getMetadataFromConfig,
invokeDenoNodeJSTransformer
} from "DNT";
const configJSR = await getMetadataFromConfig("jsr.jsonc");
await invokeDenoNodeJSTransformer({
assetsCopy: [
"LICENSE.md",
"README.md"
],
entrypoints: configJSR.exports,
generateDeclarationMap: true,
metadata: {
name: "@hugoalh/is-string-singleline",
version: configJSR.version,
description: "A module to determine whether the string is single line.",
keywords: [
"is",
"line",
"single",
"singleline",
"string"
],
homepage: "https://github.com/hugoalh-studio/is-string-singleline-es#readme",
bugs: {
url: "https://github.com/hugoalh-studio/is-string-singleline-es/issues"
},
license: "MIT",
author: "hugoalh",
repository: {
type: "git",
url: "git+https://github.com/hugoalh-studio/is-string-singleline-es.git"
},
scripts: {
},
engines: {
node: ">=16.13.0"
},
private: false,
publishConfig: {
access: "public"
}
},
outputDirectory: "npm",
outputDirectoryPreEmpty: true
});
const npmOutputDir = "npm";
const npmOutputDirDist = `${npmOutputDir}/dist`;
const npmOutputDirSource = `${npmOutputDir}/src`;
await ensureDir(npmOutputDirDist);
await ensureDir(npmOutputDirSource);
await emptyDir(npmOutputDirDist);
await emptyDir(npmOutputDirSource);
for (const { filePath, fileText } of transformResult.main.files) {
const filePathOutput = `${npmOutputDirSource}/${filePath}`;
await ensureDir(pathDirname(filePathOutput));
await Deno.writeTextFile(filePathOutput, fileText);
}
for (const { path } of pathsMain) {
if (
/^LICENSE[^\\\/]*\.md$/.test(path) ||
/^README[^\\\/]*\.md$/.test(path)
) {
await fsCopy(path, `${npmOutputDir}/${path}`, {
overwrite: true,
preserveTimestamps: true
});
}
}
await new Deno.Command("pwsh", {
args: ["-NonInteractive", "-Command", "$ErrorActionPreference = 'Stop'; npm install; npm run build; npm publish --dry-run"],
cwd: `${Deno.cwd()}/${npmOutputDir}`,
stderr: "inherit",
stdin: "inherit",
stdout: "inherit"
}).output();
110 changes: 64 additions & 46 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,90 +5,108 @@ labels:
- "Status/Pending 🔵"
- "Type/Bug 🐛"
body:
- type: "textarea"
id: "describe"
- type: "input"
id: "version"
attributes:
label: "Describe"
label: "Version"
description: |-
What the bug is? Add images and/or videos to help for explain this bug if needed.
Which version occur this bug? Version must be supported at the time of submit, the supported versions are listed in the Security Policy file `SECURITY.md`.
> [!NOTE]
> - Should not blur anything in the images and/or videos, except personal secrets.
> - For external images and/or videos, please ensure we are able to view those.
placeholder: |-
It cannot XXXXXXXX.
> - For multiple versions, separate each version with comma-space (`, `), or use versions range syntax from [OSGi](https://docs.osgi.org/whitepaper/semantic-versioning/040-semantic-versions.html) or [SemVer](https://devhints.io/semver).
placeholder: "1.0.2"
validations:
required: true
- type: "textarea"
id: "reproduce"
id: "describe"
attributes:
label: "To Reproduce"
label: "Describe"
description: |-
Is this bug reproducible? If reproducible, please show the required steps by list, images, and/or videos!
What the bug is? If needed, use images, videos, or other media type to help for explain this bug.
> [!NOTE]
> - Should not blur anything in the images and/or videos, except personal secrets.
> - For external images and/or videos, please ensure we are able to view those.
> - For external media, please ensure we are able to view those without any extra step.
placeholder: |-
1. Go to XXXXXXXX.
2. Click on XXXXXXXX.
3. Scroll to XXXXXXXX.
4. Encounter this error.
It unable to XXXXXXXX.
validations:
required: false
- type: "textarea"
id: "expected-behaviour"
required: true
- type: "input"
id: "behaviour-expected"
attributes:
label: "Expected Behaviour"
label: "Behaviour Expected"
description: |-
What things should expected to happen?
placeholder: |-
It should XXXXXXXX.
validations:
required: false
- type: "input"
id: "behaviour-actual"
attributes:
label: "Behaviour Actual"
description: |-
What things happened instead of the expected?
placeholder: |-
It XXXXXXXX.
validations:
required: false
- type: "textarea"
id: "version"
id: "reproduce"
attributes:
label: "Version"
label: "To Reproduce"
description: |-
Which versions are affected by this bug?
Is this bug reproducible? If reproducible, please show the reproduce steps; If needed, use images, videos, or other media to help for show the reproduce steps.
> [!NOTE]
> - Accept versions range.
> - Versions must be listed as supported in the Security Policy (file `SECURITY.md`).
> - For external media, please ensure we are able to view those without any extra step.
placeholder: |-
1.2.3
1. Go to XXXXXXXX.
2. Click on XXXXXXXX.
3. Scroll to XXXXXXXX.
4. Encounter this bug.
validations:
required: false
- type: "dropdown"
id: "frequency"
attributes:
label: "Frequency"
description: |-
How often does this bug occur?
options:
- "Unknown / Untested"
- "Always (~100%)"
- "Frequently (~75%)"
- "Half (~50%)"
- "Sometimes (~25%)"
- "Rarely (~5%)"
multiple: false
default: 0
validations:
required: true
- type: "textarea"
id: "execution-environment"
attributes:
label: "Execution Environment"
description: |-
How is the execution environment?
How is the execution environment? Different execution environment may have different outcome, provide this information may help for reproduce this bug.
- **Type:** Device type.
> Computer / Phone / Server / ...
- **Hardware:** Hardware specifications.
- **Platforms:** Operate system and softwares, with architecture and version.
> Windows 11 22H2 X64 / Android 14 ARM64 / Alpine 3.18.0 X64 / NodeJS 20.6.0 X64 / Deno 1.36.0 X64 / Git 2.42.0 X64 / Python 3.11.0 X64 / ...
- **IsSubSystem:** Whether the execution environment in the sub system?
> False / True
- **Variables:** Environment variables.
> NO_COLOR=1 / ...
These are common categories:
- **`type`:** Device type (e.g.: `computer`, `phone`, `server`).
- **`cpu`:** Details of the central processing unit (e.g.: `Intel i7-6700`).
- **`ram`:** Details of the random access memory (e.g.: `8 GB`).
- **`storage`:** Details of the storage unit (e.g.: `500 GB SSD`).
- **`network`:** Details of the network.
- **`gpu`:** Details of the graphics processing unit (e.g.: `NVIDIA GeForce RTX 4090`).
- **`os`:** Details of the operate system (e.g.: `Windows 11 Professional 23H2 X64`).
- **`softwares`:** List of the installed softwares (e.g.: `NodeJS 20.6.0 X64`, `Deno 1.36.0 X64`).
- **`env`:** List of the environment variables (e.g.: `NO_COLOR=1`).
> [!NOTE]
> - Accept multiple execution environments.
> - All of the properties are optional.
> - It is recommended to provide this information for reproducible steps.
> - All of the categories are optional.
**\[🖌️ YAML\]**
placeholder: |-
- Type: Server
Platforms:
- Ubuntu 23.04 X64
- NodeJS 20.6.0 X64
IsSubSystem: false
render: "yml"
validations:
required: false
Expand All @@ -97,6 +115,6 @@ body:
attributes:
label: "Additional Information"
description: |-
If there have information that related to this bug but not suitable at other fields, please list those at here.
If there have information which relevant to this bug but not suitable at other fields, please list those at here.
validations:
required: false
26 changes: 11 additions & 15 deletions .github/ISSUE_TEMPLATE/documentation-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,34 @@ labels:
- "Type/Documentation 📓"
body:
- type: "textarea"
id: "page"
id: "document"
attributes:
label: "Page"
label: "Document"
description: |-
List of the related pages.
Which document occur this issue?
> [!NOTE]
> - Accept multiple documents.
placeholder: |-
README.md
validations:
required: true
- type: "textarea"
id: "describe"
attributes:
label: "Describe"
description: |-
What the issue is? Add images and/or videos to help for explain this issue if needed.
What the issue is? If needed, use images, videos, or other media type to help for explain this issue.
> [!NOTE]
> - Should not blur anything in the images and/or videos, except personal secrets.
> - For external images and/or videos, please ensure we are able to view those.
> - For external media, please ensure we are able to view those without any extra step.
validations:
required: true
- type: "textarea"
id: "expected-content"
attributes:
label: "Expected Content"
description: |-
What contents should expected?
validations:
required: false
- type: "textarea"
id: "additional-information"
attributes:
label: "Additional Information"
description: |-
If there have information that related to this issue but not suitable at other fields, please list those at here.
If there have information which relevant to this issue but not suitable at other fields, please list those at here.
validations:
required: false
17 changes: 11 additions & 6 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,27 @@ body:
attributes:
label: "Describe"
description: |-
What feature do you want? Is your feature request related to a problem?
What feature do you want? Is your feature request related to a problem? If needed, use images, videos, or other media type to help for explain this feature.
> [!NOTE]
> - For external media, please ensure we are able to view those without any extra step.
validations:
required: true
- type: "textarea"
id: "expected-behaviour"
- type: "input"
id: "behaviour-expected"
attributes:
label: "Expected Behaviour"
label: "Behaviour Expected"
description: |-
What things should expected to happen?
placeholder: |-
It should XXXXXXXX.
validations:
required: true
required: false
- type: "textarea"
id: "additional-information"
attributes:
label: "Additional Information"
description: |-
If there have information that related to this issue but not suitable at other fields, please list those at here.
If there have information which relevant to this feature but not suitable at other fields, please list those at here.
validations:
required: false
21 changes: 2 additions & 19 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,12 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
time: "00:00"
interval: "daily"
timezone: "Etc/UTC"
labels:
- "Platform/GitHubActions"
- "Status/Pending 🔵"
- "Type/Dependency 📦"
open-pull-requests-limit: 256
open-pull-requests-limit: 100
pull-request-branch-name:
separator: "/"
- package-ecosystem: "npm"
directory: "/npm"
schedule:
interval: "weekly"
day: "sunday"
time: "00:00"
timezone: "Etc/UTC"
labels:
- "Platform/NodeJS"
- "Status/Pending 🔵"
- "Type/Dependency 📦"
open-pull-requests-limit: 256
pull-request-branch-name:
separator: "/"
versioning-strategy: "widen"
2 changes: 1 addition & 1 deletion .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://hugoalh.github.io/schema/json/github-labels.json
# yaml-language-server: $schema=https://hugoalh.github.io/schema/json/sdvcfs-labels.json
- name: "Platform/Android"
color: "#3DDC84"
description: "Related to Android."
Expand Down
Loading

0 comments on commit 64992a0

Please sign in to comment.