@zenfs/devel 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +157 -0
- package/README.md +46 -2
- package/dist/bin/make-index.d.ts +2 -0
- package/dist/bin/make-index.js +110 -0
- package/dist/bin/zci.d.ts +2 -0
- package/dist/bin/zci.js +51 -0
- package/dist/bin/zenfs-test.d.ts +2 -0
- package/dist/bin/zenfs-test.js +243 -0
- package/dist/ci.d.ts +15 -0
- package/dist/ci.js +74 -0
- package/dist/tests/common.d.ts +28 -0
- package/dist/tests/common.js +37 -0
- package/dist/tests/fs/append.test.d.ts +1 -0
- package/dist/tests/fs/append.test.js +27 -0
- package/dist/tests/fs/concurrency.test.d.ts +1 -0
- package/dist/tests/fs/concurrency.test.js +76 -0
- package/dist/tests/fs/dir.test.d.ts +1 -0
- package/dist/tests/fs/dir.test.js +83 -0
- package/dist/tests/fs/directory.test.d.ts +1 -0
- package/dist/tests/fs/directory.test.js +151 -0
- package/dist/tests/fs/errors.test.d.ts +1 -0
- package/dist/tests/fs/errors.test.js +141 -0
- package/dist/tests/fs/exists.test.d.ts +1 -0
- package/dist/tests/fs/exists.test.js +19 -0
- package/dist/tests/fs/links.test.d.ts +1 -0
- package/dist/tests/fs/links.test.js +248 -0
- package/dist/tests/fs/open.test.d.ts +1 -0
- package/dist/tests/fs/open.test.js +95 -0
- package/dist/tests/fs/permissions.test.d.ts +1 -0
- package/dist/tests/fs/permissions.test.js +346 -0
- package/dist/tests/fs/read.test.d.ts +1 -0
- package/dist/tests/fs/read.test.js +149 -0
- package/dist/tests/fs/readFile.test.d.ts +1 -0
- package/dist/tests/fs/readFile.test.js +110 -0
- package/dist/tests/fs/rename.test.d.ts +1 -0
- package/dist/tests/fs/rename.test.js +70 -0
- package/dist/tests/fs/scaling.test.d.ts +1 -0
- package/dist/tests/fs/scaling.test.js +27 -0
- package/dist/tests/fs/stat.test.d.ts +1 -0
- package/dist/tests/fs/stat.test.js +93 -0
- package/dist/tests/fs/streams.test.d.ts +1 -0
- package/dist/tests/fs/streams.test.js +161 -0
- package/dist/tests/fs/tempdir.test.d.ts +1 -0
- package/dist/tests/fs/tempdir.test.js +118 -0
- package/dist/tests/fs/times.test.d.ts +7 -0
- package/dist/tests/fs/times.test.js +134 -0
- package/dist/tests/fs/truncate.test.d.ts +1 -0
- package/dist/tests/fs/truncate.test.js +62 -0
- package/dist/tests/fs/watch.test.d.ts +1 -0
- package/dist/tests/fs/watch.test.js +320 -0
- package/dist/tests/fs/write.test.d.ts +1 -0
- package/dist/tests/fs/write.test.js +83 -0
- package/dist/tests/fs/xattr.test.d.ts +1 -0
- package/dist/tests/fs/xattr.test.js +137 -0
- package/dist/tests/logs.d.ts +1 -0
- package/dist/tests/logs.js +21 -0
- package/dist/tests/setup/memory.d.ts +1 -0
- package/dist/tests/setup/memory.js +3 -0
- package/dist/tests/setup.d.ts +9 -0
- package/dist/tests/setup.js +40 -0
- package/eslint.shared.js +60 -0
- package/package.json +91 -5
- package/tests/data/49chars.txt +1 -0
- package/tests/data/a.js +46 -0
- package/tests/data/a1.js +46 -0
- package/tests/data/elipses.txt +1 -0
- package/tests/data/empty.txt +0 -0
- package/tests/data/exit.js +22 -0
- package/tests/data/image.jpg +0 -0
- package/tests/data/utf8.txt +1 -0
- package/tests/data/x.txt +1 -0
- package/tests/data-license.md +19 -0
- package/tests/readme.md +5 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
2
|
+
import { fs as _fs } from '@zenfs/core';
|
|
3
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
4
|
+
import { join, relative } from 'node:path';
|
|
5
|
+
export const data = join(import.meta.dirname, '../../tests/data');
|
|
6
|
+
export const tmp = join(import.meta.dirname, '../../tests/tmp');
|
|
7
|
+
if (!existsSync(tmp))
|
|
8
|
+
mkdirSync(tmp, { recursive: true });
|
|
9
|
+
export async function copyAsync(_path, fs = _fs) {
|
|
10
|
+
const path = relative(data, _path) || '/';
|
|
11
|
+
const stats = statSync(_path);
|
|
12
|
+
if (!stats.isDirectory()) {
|
|
13
|
+
await fs.promises.writeFile(path, readFileSync(_path));
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (path != '/') {
|
|
17
|
+
await fs.promises.mkdir(path);
|
|
18
|
+
}
|
|
19
|
+
for (const file of readdirSync(_path)) {
|
|
20
|
+
await copyAsync(join(_path, file), fs);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export function copySync(_path, fs = _fs) {
|
|
24
|
+
const path = relative(data, _path) || '/';
|
|
25
|
+
const stats = statSync(_path);
|
|
26
|
+
if (!stats.isDirectory()) {
|
|
27
|
+
fs.writeFileSync(path, readFileSync(_path));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (path != '/') {
|
|
31
|
+
fs.mkdirSync(path);
|
|
32
|
+
}
|
|
33
|
+
for (const file of readdirSync(_path)) {
|
|
34
|
+
copySync(join(_path, file), fs);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated @hidden
|
|
39
|
+
*/
|
|
40
|
+
export const copy = copySync;
|
package/eslint.shared.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* Shared eslint rules */
|
|
2
|
+
import eslint from '@eslint/js';
|
|
3
|
+
import globals from 'globals';
|
|
4
|
+
import { configs } from 'typescript-eslint';
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
{
|
|
8
|
+
name: 'ZenFS',
|
|
9
|
+
extends: [eslint.configs.recommended, ...configs.recommendedTypeChecked],
|
|
10
|
+
files: ['src/**/*.ts', 'tests/**/*.ts'],
|
|
11
|
+
languageOptions: {
|
|
12
|
+
globals: { ...globals.browser, ...globals.node },
|
|
13
|
+
ecmaVersion: 'latest',
|
|
14
|
+
sourceType: 'module',
|
|
15
|
+
},
|
|
16
|
+
rules: {
|
|
17
|
+
'no-useless-escape': 'warn',
|
|
18
|
+
'no-unreachable': 'warn',
|
|
19
|
+
'no-fallthrough': 'warn',
|
|
20
|
+
'no-empty': 'warn',
|
|
21
|
+
'no-case-declarations': 'warn',
|
|
22
|
+
'prefer-const': 'warn',
|
|
23
|
+
'prefer-rest-params': 'warn',
|
|
24
|
+
'prefer-spread': 'warn',
|
|
25
|
+
'no-unused-vars': 'off',
|
|
26
|
+
'@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }],
|
|
27
|
+
'@typescript-eslint/no-inferrable-types': 'off',
|
|
28
|
+
'@typescript-eslint/no-this-alias': 'off',
|
|
29
|
+
'@typescript-eslint/no-unsafe-function-type': 'warn',
|
|
30
|
+
'@typescript-eslint/no-wrapper-object-types': 'warn',
|
|
31
|
+
'@typescript-eslint/triple-slash-reference': 'warn',
|
|
32
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
33
|
+
'@typescript-eslint/no-namespace': 'warn',
|
|
34
|
+
'@typescript-eslint/prefer-as-const': 'warn',
|
|
35
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
36
|
+
'@typescript-eslint/consistent-type-assertions': 'warn',
|
|
37
|
+
'@typescript-eslint/consistent-type-imports': 'warn',
|
|
38
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
|
39
|
+
'@typescript-eslint/require-await': 'warn',
|
|
40
|
+
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
41
|
+
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
42
|
+
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
43
|
+
'@typescript-eslint/no-unsafe-return': 'off',
|
|
44
|
+
'@typescript-eslint/no-redundant-type-constituents': 'warn',
|
|
45
|
+
'@typescript-eslint/no-unsafe-call': 'off',
|
|
46
|
+
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
47
|
+
'@typescript-eslint/no-base-to-string': 'off',
|
|
48
|
+
'@typescript-eslint/no-unused-expressions': 'warn',
|
|
49
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Tests overrides',
|
|
54
|
+
files: ['tests/**/*.ts'],
|
|
55
|
+
rules: {
|
|
56
|
+
'@typescript-eslint/no-floating-promises': 'off',
|
|
57
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,92 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@zenfs/devel",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Tooling for developing ZenFS packages",
|
|
5
|
+
"funding": {
|
|
6
|
+
"type": "individual",
|
|
7
|
+
"url": "https://github.com/sponsors/james-pre"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"zenfs",
|
|
11
|
+
"filesystem",
|
|
12
|
+
"testing",
|
|
13
|
+
"eslint"
|
|
14
|
+
],
|
|
15
|
+
"bin": {
|
|
16
|
+
"make-index": "dist/bin/make-index.js",
|
|
17
|
+
"zenfs-test": "dist/bin/zenfs-test.js",
|
|
18
|
+
"zci": "dist/bin/zci.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"tests",
|
|
23
|
+
"eslint.shared.js"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"homepage": "https://github.com/zen-fs/devel",
|
|
27
|
+
"author": "James Prevett <jp@jamespre.dev> (https://jamespre.dev)",
|
|
28
|
+
"license": "LGPL-3.0-or-later",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/zen-fs/devel.git"
|
|
32
|
+
},
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/zen-fs/devel/issues"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">= 22"
|
|
38
|
+
},
|
|
39
|
+
"exports": {
|
|
40
|
+
"./eslint": "./eslint.shared.js",
|
|
41
|
+
"./*": "./dist/*.js"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"provenance": true
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"format": "prettier --write .",
|
|
49
|
+
"format:check": "prettier --check .",
|
|
50
|
+
"spdx:check": "npx lice -a src",
|
|
51
|
+
"spdx:fix": "npx lice -aw src",
|
|
52
|
+
"lint": "eslint src",
|
|
53
|
+
"build": "tsc --build",
|
|
54
|
+
"dev": "tsc --build --watch",
|
|
55
|
+
"test": "node dist/bin/zenfs-test.js dist/tests/setup/memory.js",
|
|
56
|
+
"prepublishOnly": "npm run build"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@eslint/js": "^10.0.1",
|
|
60
|
+
"@octokit/action": "^8.0.4",
|
|
61
|
+
"buffer": "^6.0.3",
|
|
62
|
+
"c8": "^12.0.0",
|
|
63
|
+
"globals": "^17.3.0",
|
|
64
|
+
"kerium": "^1.5.0",
|
|
65
|
+
"typescript-eslint": "^8.58.0",
|
|
66
|
+
"utilium": "^3.7.0"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"@zenfs/core": "^2.8.0",
|
|
70
|
+
"eslint": "^10.1.0"
|
|
71
|
+
},
|
|
72
|
+
"peerDependenciesMeta": {
|
|
73
|
+
"eslint": {
|
|
74
|
+
"optional": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@types/node": "^26.0.0",
|
|
79
|
+
"@zenfs/core": "^2.8.0",
|
|
80
|
+
"eslint": "^10.1.0",
|
|
81
|
+
"prettier": "^3.2.5",
|
|
82
|
+
"typescript": "^6.0.0"
|
|
83
|
+
},
|
|
84
|
+
"prettier": {
|
|
85
|
+
"singleQuote": true,
|
|
86
|
+
"useTabs": true,
|
|
87
|
+
"tabWidth": 4,
|
|
88
|
+
"printWidth": 150,
|
|
89
|
+
"arrowParens": "avoid",
|
|
90
|
+
"experimentalOperatorPosition": "start"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0123456789abcdef0123456789abcdef0123456789abcdef
|
package/tests/data/a.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
2
|
+
//
|
|
3
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
+
// copy of this software and associated documentation files (the
|
|
5
|
+
// "Software"), to deal in the Software without restriction, including
|
|
6
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
8
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
// following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included
|
|
12
|
+
// in all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
15
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
17
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
18
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
19
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
20
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
+
|
|
22
|
+
var c = require('./b/c');
|
|
23
|
+
|
|
24
|
+
console.error('load fixtures/a.js');
|
|
25
|
+
|
|
26
|
+
var string = 'A';
|
|
27
|
+
|
|
28
|
+
exports.SomeClass = c.SomeClass;
|
|
29
|
+
|
|
30
|
+
exports.A = function () {
|
|
31
|
+
return string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.C = function () {
|
|
35
|
+
return c.C();
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.D = function () {
|
|
39
|
+
return c.D();
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.number = 42;
|
|
43
|
+
|
|
44
|
+
process.on('exit', function () {
|
|
45
|
+
string = 'A done';
|
|
46
|
+
});
|
package/tests/data/a1.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
2
|
+
//
|
|
3
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
+
// copy of this software and associated documentation files (the
|
|
5
|
+
// "Software"), to deal in the Software without restriction, including
|
|
6
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
8
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
// following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included
|
|
12
|
+
// in all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
15
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
17
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
18
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
19
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
20
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
+
|
|
22
|
+
var c = require('./b/c');
|
|
23
|
+
|
|
24
|
+
console.error('load fixtures/a.js');
|
|
25
|
+
|
|
26
|
+
var string = 'A';
|
|
27
|
+
|
|
28
|
+
exports.SomeClass = c.SomeClass;
|
|
29
|
+
|
|
30
|
+
exports.A = function () {
|
|
31
|
+
return string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.C = function () {
|
|
35
|
+
return c.C();
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.D = function () {
|
|
39
|
+
return c.D();
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.number = 42;
|
|
43
|
+
|
|
44
|
+
process.on('exit', function () {
|
|
45
|
+
string = 'A done';
|
|
46
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
2
|
+
//
|
|
3
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
+
// copy of this software and associated documentation files (the
|
|
5
|
+
// "Software"), to deal in the Software without restriction, including
|
|
6
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
8
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
// following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included
|
|
12
|
+
// in all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
15
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
17
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
18
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
19
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
20
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
+
|
|
22
|
+
process.exit(process.argv[2] || 1);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
南越国是前203年至前111年存在于岭南地区的一个国家,国都位于番禺,疆域包括今天中国的广东、广西两省区的大部份地区,福建省、湖南、贵州、云南的一小部份地区和越南的北部。南越国是秦朝灭亡后,由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、经济现状。
|
package/tests/data/x.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
xyz
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) Joyent, Inc. and other Node contributors for `test/data`.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|