Skip to content

Commit

Permalink
chore(upgrade): upgrade dependencies and fix scripts issues
Browse files Browse the repository at this point in the history
  • Loading branch information
giamir committed Dec 4, 2023
1 parent 612fe68 commit a972d4e
Show file tree
Hide file tree
Showing 10 changed files with 558 additions and 2,592 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
run: |
if [[ ${{ github.ref }} == *"rc"* ]]; then
npm publish --tag rc
else
npm publish --tag latest
fi
if [[ ${{ github.ref }} == *"rc"* ]]; then
npm publish --tag rc
else
npm publish --tag latest
fi
- name: .NET Build
run: npm run pack:nuget
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ In order to publish a new release to npm and NuGet, you just need to tag a new r
```sh
npm version [major|minor|patch]
# for prerelase candidates instead use:
# npm version prerelease --preid rc
# npm version prerelease --preid rc
git push --follow-tags
```

Expand Down
3,096 changes: 529 additions & 2,567 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"prettier": "@stackoverflow/prettier-config",
"scripts": {
"start": "npm run build",
"build": "ts-node ./scripts/build/index.ts",
"build": "node --no-warnings --loader ts-node/esm ./scripts/build/index.ts",
"preview": "http-server ./preview -o",
"prepublishOnly": "npm start",
"version": "ts-node ./scripts/sync-dotnet-version.ts",
"version": "node --no-warnings --loader ts-node/esm ./scripts/sync-dotnet-version.ts",
"lint": "prettier --check . --end-of-line auto && eslint .",
"format": "prettier --write . --end-of-line auto",
"build:nuget": "dotnet build -c Release ./dotnet",
"pack:nuget": "dotnet pack -c Release ./dotnet",
"test:nuget": "dotnet test ./dotnet",
"lint:eslint": "eslint .",
"lint:prettier": "prettier --check . --end-of-line auto"
"test:nuget": "dotnet test ./dotnet"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.5",
Expand All @@ -57,8 +57,8 @@
"dotenv": "^16.3.1",
"http-server": "^14.1.1",
"mini-svg-data-uri": "^1.4.4",
"rollup": "^4.6.0",
"svgo": "^3.0.4",
"rollup": "^4.6.1",
"svgo": "^3.0.5",
"ts-node": "^10.9.1",
"tslib": "^2.6.2",
"typescript": "^5.3.2"
Expand Down
2 changes: 2 additions & 0 deletions scripts/build/write-js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export function writeJsModule(

export async function bundleHelperJsAsync() {
let bundle;
// @ts-expect-error https://github.com/rollup/plugins/issues/1541
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const plugin = rollupTypescript({
include: "**/src/js/*.ts",
});
Expand Down
12 changes: 6 additions & 6 deletions scripts/sync-dotnet-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const execAsync = promisify(exec);

(async () => {
const version = packageJson.version;
const path = "dotnet/src/StackExchange.StacksIcons.csproj";
const path = "dotnet/src/StackExchange.StacksIcons.csproj";

let file = await readFile(path, "utf-8");
let file = await readFile(path, "utf-8");

file = file.replace(
/<Version>.*<\/Version>/,
`<Version>${version}</Version>`
);
file = file.replace(
/<Version>.*<\/Version>/,
`<Version>${version}</Version>`
);

await writeFile(path, file, "utf-8");

Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion src/js/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as Icons from "../../dist/icons.js";
// @ts-expect-error types are autogenerated via build script
import * as Spots from "../../dist/spots.js";
import { browserHelper } from "./helpers";
import { browserHelper } from "./helpers.js";

export { Icons, Spots, browserHelper };

Expand Down
2 changes: 1 addition & 1 deletion src/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
export * from "../../dist/icons";
// @ts-expect-error types are autogenerated via build script
export * from "../../dist/spots";
export * from "./helpers";
export * from "./helpers.js";
8 changes: 5 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "@stackoverflow/tsconfig/tsconfig.json",
"compilerOptions": {
"target": "esnext",
"module": "nodenext",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"sourceMap": false,
"strict": true,
"forceConsistentCasingInFileNames": true,
Expand All @@ -14,13 +17,12 @@
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"verbatimModuleSyntax": true,
"checkJs": true,
"outDir": "./tmp",
"noEmitOnError": true
},
"exclude": ["dist/**/*", "./*.cjs"],
"ts-node": {
"esm": true
"experimentalSpecifierResolution": "node"
}
}

0 comments on commit a972d4e

Please sign in to comment.