Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #67

Merged
merged 5 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/plenty-toes-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@drupal-kit/simple-oauth-auth-code": patch
"@drupal-kit/config-typescript": patch
"@drupal-kit/config-prettier": patch
"@drupal-kit/eslint-config": patch
"@drupal-kit/simple-oauth": patch
"@drupal-kit/verification": patch
"@drupal-kit/consumers": patch
"@drupal-kit/user-api": patch
"@drupal-kit/jsonapi": patch
"@drupal-kit/types": patch
"@drupal-kit/core": patch
---

Update all dependencies; Update to nodejs 20 for dev / test / ci environment.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

- name: Syncpack
run: pnpm syncpack
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

- name: Build
run: pnpm build
env:
Expand Down
51 changes: 8 additions & 43 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
ww-node-overlays.url = "github:wunderwerkio/nix-node-packages-overlays";
ww-utils.url = "github:wunderwerkio/nix-ww-utils";
};

outputs = {
self,
nixpkgs,
ww-node-overlays,
ww-utils,
}: {
devShells = ww-utils.lib.forEachWunderwerkSystem (
}: let
forEachSystem = nixpkgs.lib.genAttrs [
"x86_64-linux" "aarch64-linux"
"x86_64-darwin" "aarch64-darwin"
];
in {
devShells = forEachSystem (
system: let
overlays = with ww-node-overlays.overlays; [
pnpm
vercel
];
pkgs = import nixpkgs {
inherit system overlays;
};
in rec {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs-18_x
nodejs_20

nodePackages.pnpm-latest
];
};
}
);

formatter = ww-utils.lib.forEachWunderwerkSystem (
formatter = forEachSystem (
system:
nixpkgs.legacyPackages.${system}.alejandra
);
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
],
"private": true,
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1",
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"@drupal-kit/config-prettier": "workspace:*",
"husky": "^8.0.3",
"syncpack": "^9.8.6",
"turbo": "^1.9.6"
"syncpack": "^12.3.0",
"turbo": "^1.11.3"
},
"scripts": {
"build": "turbo run build",
Expand All @@ -25,6 +25,7 @@
"format:write": "prettier --write 'packages/*/**/*.{ts,tsx}' && syncpack format",
"lint": "turbo run lint",
"publish-packages": "turbo run test && turbo run export-version && turbo run build lint typecheck && changeset publish",
"syncpack": "syncpack lint",
"test": "turbo run test",
"test:watch": "turbo run test:watch",
"typecheck": "turbo run typecheck",
Expand Down
14 changes: 7 additions & 7 deletions packages/config/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"main": "index.js",
"private": true,
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"@wunderwerk/eslint-config": "^1.0.3",
"eslint": "^8.40.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^44.2.4",
"typescript": "5.0.4"
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@wunderwerk/eslint-config": "^1.0.7",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.0.2",
"typescript": "5.3.3"
},
"files": [
"index.js"
Expand Down
29 changes: 10 additions & 19 deletions packages/config/prettier/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,14 @@ module.exports = {
semi: true,
trailingComma: "all",
tabWidth: 2,
plugins: [
"@ianvs/prettier-plugin-sort-imports",
],
"pluginSearchDirs": false,
importOrder: [
"^(jest-fetch-mock)$",
"<THIRD_PARTY_MODULES>",
"^@drupal-kit/(.*)$",
"",
"^~/utils/(.*)$",
"^~/(.*)$",
"^[./]",
],
importOrderSeparation: false,
importOrderSortSpecifiers: true,
importOrderBuiltinModulesToTop: true,
importOrderParserPlugins: ["decorators-legacy", "importAssertions", "typescript"],
importOrderMergeDuplicateImports: true,
importOrderCombineTypeAndValueImports: true,
// plugins: [
// "@ianvs/prettier-plugin-sort-imports",
// ],
// importOrder: [
// "<THIRD_PARTY_MODULES>",
// "^@drupal-kit/(.*)$",
// "",
// "^@/(.*)$",
// "^[./]",
// ],
};
6 changes: 3 additions & 3 deletions packages/config/prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"main": "index.js",
"private": true,
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^3.7.2",
"prettier": "^2.8.8",
"typescript": "5.0.4"
"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
"prettier": "^3.2.4",
"typescript": "5.3.3"
},
"files": [
"index.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/config/typescript/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"strictNullChecks": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node16",
"module": "nodenext",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"isolatedModules": true
},
Expand Down
2 changes: 1 addition & 1 deletion packages/config/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.10.0",
"private": true,
"devDependencies": {
"typescript": "5.0.4"
"typescript": "5.3.3"
},
"files": [
"base.json"
Expand Down
5 changes: 4 additions & 1 deletion packages/consumers/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": ["@drupal-kit/eslint-config"]
"extends": ["@drupal-kit/eslint-config"],
"parserOptions": {
"project": "./tsconfig.json"
}
}
16 changes: 8 additions & 8 deletions packages/consumers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"@drupal-kit/types": "workspace:0.10.0",
"@rollup/plugin-typescript": "^11.1.1",
"@swc/core": "^1.3.58",
"ava": "^5.2.0",
"esbuild": "^0.17.19",
"msw": "^1.2.1",
"rollup": "^3.22.0",
"rollup-plugin-dts": "^5.3.0",
"rollup-plugin-esbuild": "^5.0.0",
"ts-node": "^10.9.1",
"typescript": "5.0.4"
"ava": "^6.0.1",
"esbuild": "^0.19.11",
"msw": "^2.1.2",
"rollup": "^4.9.5",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-esbuild": "^6.1.0",
"ts-node": "^10.9.2",
"typescript": "5.3.3"
},
"scripts": {
"build": "rollup -c",
Expand Down
23 changes: 13 additions & 10 deletions packages/consumers/tests/plugin.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from "ava";
import { rest } from "msw";
import { http, HttpResponse } from "msw";
import { setupServer } from "msw/node";
import { Drupalkit, DrupalkitOptions } from "@drupal-kit/core";

Expand Down Expand Up @@ -40,9 +40,10 @@ test.serial("Add consumer id to request", async (t) => {
t.plan(2);

server.use(
rest.get("*", (req, res) => {
t.is(req.headers.get("X-Consumer-ID"), CONSUMER_UUID);
return res();
http.get("*", ({ request }) => {
t.is(request.headers.get("X-Consumer-ID"), CONSUMER_UUID);

return HttpResponse.text();
}),
);

Expand All @@ -64,9 +65,10 @@ test.serial(
t.plan(1);

server.use(
rest.get("*", (req, res) => {
t.is(req.headers.get("X-Consumer-ID"), null);
return res();
http.get("*", ({ request }) => {
t.is(request.headers.get("X-Consumer-ID"), null);

return HttpResponse.text();
}),
);

Expand All @@ -84,9 +86,10 @@ test.serial("Add consumer id with custom header name", async (t) => {
t.plan(1);

server.use(
rest.get("*", (req, res) => {
t.is(req.headers.get("X-Custom-Consumer-ID"), CONSUMER_UUID);
return res();
http.get("*", ({ request }) => {
t.is(request.headers.get("X-Custom-Consumer-ID"), CONSUMER_UUID);

return HttpResponse.text();
}),
);

Expand Down
5 changes: 4 additions & 1 deletion packages/core/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": ["@drupal-kit/eslint-config"]
"extends": ["@drupal-kit/eslint-config"],
"parserOptions": {
"project": "./tsconfig.json"
}
}
Loading
Loading