Skip to content

Commit

Permalink
fix: fix type errors and upgrade ncc
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypicalpro committed Dec 9, 2020
1 parent 9ed4939 commit 1cfa4f7
Show file tree
Hide file tree
Showing 31 changed files with 7,910 additions and 685 deletions.
559 changes: 282 additions & 277 deletions dist/default.json

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions dist/donotedit
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* TL;DR: Don't touch this.
*
* DO NOT EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND COMPILED FROM AN
* EXTERNAL REGEXPS DATABASE. TO UPDATE THIS FILE MANUALLY PLEASE RUN THE:
*
* ```
* npm run update
* ```
*
* COMMAND FROM THE ROOT OF THIS REPOSITORY. IF YOU FOUND A REGULAR EXPRESSION THAT
* IS BROKEN OR MISSING. PLEASE MAKE THE PULL REQUESTS TO REGEXP DATABASE NOT TO
* THIS MODULE AS THEY WILL BE REJECTED INSTANTLY. THE SOURCE FILE LOCATION CAN
* BE FOUND IN THE `update.js` FILE WHICH IS IN THE SAME FOLDER AS THIS FILE. PLEASE
* SEE THE `exports.remote` PART OF THE FILE.
*/
46 changes: 23 additions & 23 deletions dist/fixes/file-create-config.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/todogroup/repolinter/master/fixes/file-create-config.json",
"type": "object",
"properties": {
"file": { "type": "string" },
"text": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"properties": { "url": { "type": "string" } }
},
{
"type": "object",
"additionalProperties": false,
"properties": { "file": { "type": "string" } }
}
]
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/todogroup/repolinter/master/fixes/file-create-config.json",
"type": "object",
"properties": {
"file": { "type": "string" },
"text": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"properties": { "url": { "type": "string" } }
},
"replace": {
"type": "boolean",
"default": false
{
"type": "object",
"additionalProperties": false,
"properties": { "file": { "type": "string" } }
}
]
},
"required": ["file", "text"]
"replace": {
"type": "boolean",
"default": false
}
},
"required": ["file", "text"]
}
104 changes: 52 additions & 52 deletions dist/fixes/file-modify-config.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/todogroup/repolinter/master/fixes/file-modify-config.json",
"type": "object",
"properties": {
"nocase": {
"type": "boolean",
"default": false
},
"newlines": {
"type": "object",
"default": {},
"properties": {
"begin": { "type": "number", "default": 0 },
"end": { "type": "number", "default": 0 }
}
},
"files": {
"type": "array",
"items": { "type": "string" }
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/todogroup/repolinter/master/fixes/file-modify-config.json",
"type": "object",
"properties": {
"nocase": {
"type": "boolean",
"default": false
},
"newlines": {
"type": "object",
"default": {},
"properties": {
"begin": { "type": "number", "default": 0 },
"end": { "type": "number", "default": 0 }
}
},
"files": {
"type": "array",
"items": { "type": "string" }
},
"skip-paths-matching": {
"type": "object",
"additionalProperties": false,
"properties": {
"extensions": {
"type": "array",
"items": { "type": "string" }
},
"skip-paths-matching": {
"type": "object",
"additionalProperties": false,
"properties": {
"extensions": {
"type": "array",
"items": { "type": "string" }
},
"patterns": {
"type": "array",
"items": { "type": "string" }
},
"flags": { "type": "string" }
},
"required": ["patterns"]
"patterns": {
"type": "array",
"items": { "type": "string" }
},
"text": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"properties": { "url": { "type": "string" } }
},
{
"type": "object",
"additionalProperties": false,
"properties": { "file": { "type": "string" } }
}
]
"flags": { "type": "string" }
},
"required": ["patterns"]
},
"text": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"properties": { "url": { "type": "string" } }
},
"write_mode": {
"default": "append",
"enum": ["prepend", "append"]
{
"type": "object",
"additionalProperties": false,
"properties": { "file": { "type": "string" } }
}
]
},
"required": ["text"]
"write_mode": {
"default": "append",
"enum": ["prepend", "append"]
}
},
"required": ["text"]
}
36 changes: 36 additions & 0 deletions dist/github_markup_check_and_render
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env ruby
# encoding: UTF-8
# Modified github_markup utility which checks first that the file can be rendered before rendering

$LOAD_PATH.unshift File.dirname(File.realpath(__FILE__)) + "/../lib"
require 'github/markup'
require 'charlock_holmes'

if ARGV.size < 1
print "usage: #{File.basename($0)} FILE\n"
exit 1
end

name = ARGV.first
file_contents = nil

begin
file = File.open( name, "r" )
encoded_contents = file.read
file.close
detection = CharlockHolmes::EncodingDetector.detect(encoded_contents)
file_contents = encoded_contents.encode("UTF-8", detection[:encoding], invalid: :replace, replace: "")
rescue Exception => e
$stderr.print "error: #{e.message}\n"
exit 1
ensure
end


if GitHub::Markup.can_render?( name, file_contents )
print GitHub::Markup.render( name, file_contents )
exit 0
else
print "File '#{name}' cannot be rendered.\n"
exit 1
end
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 1cfa4f7

Please sign in to comment.