Skip to content

Commit

Permalink
Merge pull request #36 from uttori/ESM-ONLY
Browse files Browse the repository at this point in the history
v6 - Update to ESM
  • Loading branch information
MatthewCallis authored Dec 23, 2023
2 parents 79aeb4e + c6e2f15 commit 95d6fae
Show file tree
Hide file tree
Showing 69 changed files with 15,907 additions and 15,039 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ coverage
site/themes/*
convert
node_modules
types/*
dist/*
48 changes: 32 additions & 16 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
"plugin:import/recommended",
"plugin:jsdoc/recommended",
"plugin:jsx-a11y/recommended",
"plugin:node/recommended",
"plugin:n/recommended",
"plugin:optimize-regex/all",
"plugin:ramda/recommended",
"plugin:security/recommended",
"plugin:sonarjs/recommended"
"plugin:security/recommended-legacy",
"plugin:sonarjs/recommended",
"plugin:@typescript-eslint/recommended-type-checked"
],
"plugins": [
"@typescript-eslint",
"anti-trojan-source",
"ava",
"import",
"jsdoc",
"jsx-a11y",
"no-inferred-method-name",
"node",
"n",
"optimize-regex",
"ramda",
"security",
"sonarjs",
"xss"
Expand All @@ -33,17 +33,23 @@
"sinon": false,
"expect": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2022,
"requireConfigFile": false
"ecmaVersion": "latest",
"project": "./tsconfig.json",
"requireConfigFile": false,
"sourceType": "module"
},
"rules": {
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"anti-trojan-source/no-bidi": "error",
"ava/no-only-test": "warn",
"camelcase": 0,
"consistent-return": ["warn", { "treatUndefinedAsUnspecified": false }],
"eslint-comments/no-use": 0,
"filenames/match-regex": 0,
"global-require": 0,
"import/no-commonjs": 0,
"import/no-dynamic-require": 0,
"import/no-extraneous-dependencies": [
Expand All @@ -53,10 +59,10 @@
"peerDependencies": true
}
],
"import/extensions": ["warn", "ignorePackages"],
"import/no-unresolved": 0,
"max-len": 0,
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-inferred-method-name/no-inferred-method-name": "error",
"no-param-reassign": 0,
"no-plusplus": 0,
"no-restricted-syntax": [
Expand All @@ -75,18 +81,28 @@
}
],
"no-underscore-dangle": 0,
"no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "caughtErrors": "none" }],
"node/no-missing-require": 0,
"node/no-unpublished-require": 0,
"no-unused-vars": 0,
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "caughtErrors": "none" }],
"object-curly-newline": 0,
"optimize-regex/optimize-regex": "warn",
"prettier/prettier": 0,
"security/detect-non-literal-fs-filename": 0,
"security/detect-non-literal-require": 0,
"security/detect-object-injection": 0,
"sonarjs/cognitive-complexity": 0,
"sonarjs/no-duplicate-string": 0
},
"overrides": [
{
"files": ["**/*.{spec,test}.*", "test/_helpers/*.*"],
"rules": {
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-return": 0
}
}
],
"settings": {
"jsdoc": {
"mode": "typescript"
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.1
v20.10.0
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: node_js
node_js:
- "16"
- "18"
- "20"

install:
- npm ci
Expand All @@ -11,10 +10,8 @@ cache:
- "$HOME/.npm"

script:
- npm install -g coveralls
- npm run lint
- npm run validate --prod
- npm run test && nyc report --reporter=text-lcov | coveralls

branches:
only:
Expand Down
26 changes: 0 additions & 26 deletions .tsconfig.json

This file was deleted.

31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

## [6.0.0](https://github.com/uttori/uttori-wiki/compare/v5.2.2...v6.0.0) - 2023-12-22

- 💥 BREAKING CHANGES!
- 💥 Rename config key: `home_page` to `homePage`
- 💥 Rename config key: `ignore_slugs` to `ignoreSlugs`
- 💥 Rename config key: `home_page` to `excerptLength`
- 💥 Rename config key: `excerpt_length` to `homePage`
- 💥 Rename config key: `site_url` to `publicUrl`
- 💥 Rename config key: `theme_dir` to `themePath`
- 💥 Rename config key: `public_dir` to `publicPath`
- 💥 Rename config key: `use_delete_key` to `useDeleteKey`
- 💥 Rename config key: `delete_key` to `deleteKey`
- 💥 Rename config key: `use_edit_key` to `useEditKey`
- 💥 Rename config key: `edit_key` to `editKey`
- 💥 Rename config key: `public_history` to `publicHistory`
- 💥 Rename config key: `handle_not_found` to `handleNotFound`
- 💥 Rename config key: `use_cache` to `useCache`
- 💥 Rename config key: `cache_short` to `cacheShort`
- 💥 Rename config key: `cache_long` to `cacheLong`
- 💥 Removed many configuration options that were not being used or items that should be theme specific: `site_title`, `site_header`, `site_footer`, `site_sections`, `site_locale`, `site_twitter_site`, `site_twitter_creator`, `site_image`
- 🧰 Add support for setting the `routes` for search & tags
- 🧰 Add support for setting the `titles` for search & tags
- 🧰 Added support for `allowCRUDRoutes` to disable the CRUD routes for a read-only wiki
- 🧰 Added support for `ignoreTags` to ignore documents with specific tags
- 🧰 Remove support for CommonJS, now requires ESM support
- Change the `detailRoute` route path matcher to `/:slug*?` to allow for nested routes with the use of overriding `detailRoute` and handling the `request.params.slug` value accordingly`
- 🎁 Update dependencies
- 🛠 Standardize types
- 🛠 Update ESLint configuration
- 🛠 Update documentation

## [5.2.2](https://github.com/uttori/uttori-wiki/compare/v5.2.1...v5.2.2) - 2023-04-14

- 🛠 Overhaul types and fix some type related warnings.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018-2021 Matthew Callis
Copyright (c) 2018-2023 Matthew Callis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 95d6fae

Please sign in to comment.