aberlaas 2.2.0 → 2.4.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 +9 -0
- package/README.md +1 -19
- package/commands/ci/index.js +14 -99
- package/commands/init/index.js +322 -205
- package/commands/lint/css.js +2 -2
- package/commands/lint/helpers/prettier.js +2 -2
- package/commands/lint/index.js +3 -2
- package/commands/lint/js.js +1 -1
- package/commands/precommit/index.js +4 -3
- package/commands/setup/index.js +0 -12
- package/commands/test/index.js +56 -48
- package/configs/eslint.cjs +9 -2
- package/configs/lintstaged.js +25 -0
- package/configs/node.cjs +4 -0
- package/configs/{prettier.cjs → prettier.js} +1 -1
- package/configs/{stylelint.cjs → stylelint.js} +1 -1
- package/configs/vite.js +9 -2
- package/main.js +31 -2
- package/package.json +24 -23
- package/templates/_circleci/config.yml +0 -1
- package/templates/_eslintignore.conf +4 -1
- package/templates/_gitattributes +4 -0
- package/templates/_gitignore +29 -0
- package/templates/lerna.json +6 -0
- package/templates/lib/__tests__/main.js +7 -5
- package/templates/lib/main.js +2 -2
- package/templates/lintstaged.config.js +4 -0
- package/templates/prettier.config.js +4 -0
- package/templates/scripts/ci +3 -1
- package/templates/scripts/compress +2 -2
- package/templates/scripts/docs/build +4 -0
- package/templates/scripts/docs/build-prod +4 -0
- package/templates/scripts/docs/cms +4 -0
- package/templates/scripts/docs/serve +4 -0
- package/templates/scripts/hooks/pre-commit +1 -1
- package/templates/scripts/lib/release +5 -0
- package/templates/scripts/lib/test +4 -0
- package/templates/scripts/lib/test-watch +4 -0
- package/templates/scripts/lint +2 -2
- package/templates/scripts/lint-fix +2 -2
- package/templates/stylelint.config.js +4 -0
- package/templates/vite.config.js +2 -2
- package/commands/ci/autoRelease.js +0 -143
- package/commands/release/index.js +0 -76
- package/commands/setup/autoRelease/envVars.js +0 -56
- package/commands/setup/autoRelease/index.js +0 -59
- package/commands/setup/autoRelease/privateKey.js +0 -41
- package/commands/setup/autoRelease/publicKey.js +0 -55
- package/configs/lintstaged.cjs +0 -31
- package/templates/_lintstagedrc.cjs +0 -4
- package/templates/_prettierrc.cjs +0 -4
- package/templates/_stylelintrc.cjs +0 -4
- package/templates/scripts/release +0 -4
- package/templates/scripts/test +0 -4
- package/templates/scripts/test-watch +0 -4
|
@@ -7,13 +7,14 @@ export default {
|
|
|
7
7
|
// Config
|
|
8
8
|
const configPath = await helper.configFile(
|
|
9
9
|
cliArgs.config,
|
|
10
|
-
'.
|
|
11
|
-
'
|
|
10
|
+
'lintstaged.config.js',
|
|
11
|
+
'configs/lintstaged.js',
|
|
12
12
|
);
|
|
13
|
+
const config = await helper.import(configPath);
|
|
13
14
|
|
|
14
15
|
try {
|
|
15
16
|
const result = await lintStaged({
|
|
16
|
-
|
|
17
|
+
config,
|
|
17
18
|
});
|
|
18
19
|
// Linting failed
|
|
19
20
|
if (!result) {
|
package/commands/setup/index.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import github from './github.js';
|
|
2
2
|
import circleci from './circleci.js';
|
|
3
3
|
import renovate from './renovate.js';
|
|
4
|
-
import autoRelease from './autoRelease/index.js';
|
|
5
4
|
import _ from 'golgoth/lodash.js';
|
|
6
5
|
|
|
7
6
|
export default {
|
|
8
7
|
/**
|
|
9
8
|
* Enable external services.
|
|
10
9
|
* Will enable CircleCI, GitHub and Renovate by default.
|
|
11
|
-
* If --auto-release is passed, will configure CircleCI
|
|
12
10
|
* @param {object} cliArgs CLI Argument object, as created by minimist
|
|
13
11
|
**/
|
|
14
12
|
async run(cliArgs = {}) {
|
|
@@ -16,7 +14,6 @@ export default {
|
|
|
16
14
|
circleci: true,
|
|
17
15
|
renovate: true,
|
|
18
16
|
github: true,
|
|
19
|
-
'auto-release': false,
|
|
20
17
|
};
|
|
21
18
|
const cliServices = _.omit(cliArgs, ['_']);
|
|
22
19
|
const servicesToEnable = {
|
|
@@ -33,9 +30,6 @@ export default {
|
|
|
33
30
|
if (servicesToEnable.renovate) {
|
|
34
31
|
await this.renovate();
|
|
35
32
|
}
|
|
36
|
-
if (servicesToEnable['auto-release']) {
|
|
37
|
-
await this.autoRelease();
|
|
38
|
-
}
|
|
39
33
|
},
|
|
40
34
|
/**
|
|
41
35
|
* Configure GitHub
|
|
@@ -55,10 +49,4 @@ export default {
|
|
|
55
49
|
async renovate() {
|
|
56
50
|
await renovate.enable();
|
|
57
51
|
},
|
|
58
|
-
/**
|
|
59
|
-
* Enable autoRelease on CircleCI
|
|
60
|
-
**/
|
|
61
|
-
async autoRelease() {
|
|
62
|
-
await autoRelease.enable();
|
|
63
|
-
},
|
|
64
52
|
};
|
package/commands/test/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { createVitest, registerConsoleShortcuts } from 'vitest/node';
|
|
1
2
|
import helper from '../../helper.js';
|
|
2
|
-
import
|
|
3
|
+
import firostError from 'firost/error.js';
|
|
3
4
|
import _ from 'golgoth/lodash.js';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
@@ -15,69 +16,76 @@ export default {
|
|
|
15
16
|
* @param {object} cliArgs CLI Argument object, as created by minimist
|
|
16
17
|
* @returns {boolean} true on success
|
|
17
18
|
**/
|
|
18
|
-
async run(cliArgs) {
|
|
19
|
-
const options = await this.
|
|
19
|
+
async run(cliArgs = {}) {
|
|
20
|
+
const options = await this.vitestOptions(cliArgs);
|
|
21
|
+
const files = _.isEmpty(cliArgs._) ? [helper.hostPath()] : cliArgs._;
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
return true;
|
|
23
|
-
},
|
|
23
|
+
const vitest = await createVitest('test', options);
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
**/
|
|
30
|
-
async vitestCliOptions(cliArgs = {}) {
|
|
31
|
-
// Options that have special meaning in aberlaas and shouldn't be passed
|
|
32
|
-
// as-is to vitest
|
|
33
|
-
const aberlaasOptions = ['_', 'watch', 'config', 'failFast', 'related'];
|
|
25
|
+
// Enable keyboard interaction in watch mode
|
|
26
|
+
if (options.watch) {
|
|
27
|
+
registerConsoleShortcuts(vitest);
|
|
28
|
+
}
|
|
34
29
|
|
|
35
|
-
//
|
|
36
|
-
const
|
|
37
|
-
|
|
30
|
+
// Note: vitest sets process.exitCode to 1 if tests fail
|
|
31
|
+
const initialExitCode = process.exitCode;
|
|
32
|
+
await vitest.start(files);
|
|
38
33
|
|
|
39
|
-
//
|
|
40
|
-
if (
|
|
41
|
-
|
|
34
|
+
// Close vitest if not watching files
|
|
35
|
+
if (!options.watch) {
|
|
36
|
+
await vitest.close();
|
|
42
37
|
}
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
if (process.exitCode == 1) {
|
|
40
|
+
process.exitCode = initialExitCode;
|
|
41
|
+
throw firostError('ERROR_TEST', 'Error while testing files');
|
|
47
42
|
}
|
|
48
43
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// Allow a success, even if no files are passed
|
|
53
|
-
vitestOptions.push('--passWithNoTests');
|
|
44
|
+
return true;
|
|
45
|
+
},
|
|
54
46
|
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Transform all aberlaas test cli options into suitable vitest options
|
|
49
|
+
* @param {object} cliArgs CLI Argument object, as created by minimist
|
|
50
|
+
* @returns {Array} Array of options for vitest
|
|
51
|
+
**/
|
|
52
|
+
async vitestOptions(cliArgs = {}) {
|
|
53
|
+
// Options that have special meaning in aberlaas and shouldn't be passed
|
|
54
|
+
// as-is to vitest
|
|
55
|
+
const specialMeaningCliArgs = ['_', 'config', 'failFast', 'related'];
|
|
57
56
|
|
|
58
|
-
//
|
|
57
|
+
// Reading base options from the config file
|
|
59
58
|
const configFile = await helper.configFile(
|
|
60
59
|
cliArgs.config,
|
|
61
60
|
'vite.config.js',
|
|
62
|
-
'
|
|
61
|
+
'configs/vite.js',
|
|
63
62
|
);
|
|
64
|
-
|
|
63
|
+
const optionsFromConfig = (await helper.import(configFile)).test;
|
|
65
64
|
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
// Enhancing options with custom CLI arguments
|
|
66
|
+
const optionsFromAberlaas = {
|
|
67
|
+
// We always allow fit/fdescribe, even in CI. Those errors will be caught
|
|
68
|
+
// by the lint command instead
|
|
69
|
+
allowOnly: true,
|
|
70
|
+
};
|
|
71
|
+
// --failFast stops early as soon as one test fails
|
|
72
|
+
if (cliArgs.failFast) {
|
|
73
|
+
optionsFromAberlaas.bail = 1;
|
|
74
|
+
}
|
|
75
|
+
// --related runs also related files
|
|
76
|
+
// Note (2024-01-19): The related option is not documented, but should
|
|
77
|
+
// contain the list of files
|
|
78
|
+
if (cliArgs.related) {
|
|
79
|
+
optionsFromAberlaas.related = cliArgs._;
|
|
80
|
+
}
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
// Passing other CLI options directly to vitest
|
|
83
|
+
const optionsFromCli = _.omit(cliArgs, specialMeaningCliArgs);
|
|
80
84
|
|
|
81
|
-
return
|
|
85
|
+
return {
|
|
86
|
+
...optionsFromConfig,
|
|
87
|
+
...optionsFromAberlaas,
|
|
88
|
+
...optionsFromCli,
|
|
89
|
+
};
|
|
82
90
|
},
|
|
83
91
|
};
|
package/configs/eslint.cjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Note: ESLint doesn't support ESM configuration as of 2024-02-19. This file
|
|
2
|
+
// needs to stay as a CommonJS file
|
|
1
3
|
const nodeConfig = require('./node.cjs');
|
|
2
4
|
module.exports = {
|
|
3
5
|
env: {
|
|
@@ -17,8 +19,8 @@ module.exports = {
|
|
|
17
19
|
],
|
|
18
20
|
settings: {
|
|
19
21
|
// eslint-plugin-import doesn't currently support the "exports" syntax in
|
|
20
|
-
// package.json. This allow mapping between custom
|
|
21
|
-
// files on disk.
|
|
22
|
+
// package.json. This is supposed to allow mapping between custom
|
|
23
|
+
// entrypoints and files on disk.
|
|
22
24
|
// For example, it doesn't understand "import * from 'vitest/config';" as
|
|
23
25
|
// "vitest/config/" isn't really an existing filepath, but a mapping defined
|
|
24
26
|
// in vitest package.json
|
|
@@ -59,6 +61,11 @@ module.exports = {
|
|
|
59
61
|
property: 'export',
|
|
60
62
|
message: 'Typo: Use module.exports instead',
|
|
61
63
|
},
|
|
64
|
+
{
|
|
65
|
+
object: '_',
|
|
66
|
+
property: 'contains',
|
|
67
|
+
message: 'Typo: Use _.includes instead',
|
|
68
|
+
},
|
|
62
69
|
],
|
|
63
70
|
'no-unused-vars': [
|
|
64
71
|
'error',
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const readmeCommands = [
|
|
2
|
+
'yarn run aberlaas readme',
|
|
3
|
+
'git add ./README.md ./lib/README.md',
|
|
4
|
+
];
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
// Lint
|
|
8
|
+
'*.css': ['yarn run lint:fix --css'],
|
|
9
|
+
'*.{yml,yaml}': ['yarn run lint:fix --yml'],
|
|
10
|
+
'.circleci/config.yml': ['yarn run lint --circleci'],
|
|
11
|
+
'*.json': ['yarn run lint:fix --json'],
|
|
12
|
+
'*.js': ['yarn run lint:fix --js'],
|
|
13
|
+
|
|
14
|
+
// Test
|
|
15
|
+
'./lib/**/*.js': ['yarn run test --failFast --related'],
|
|
16
|
+
|
|
17
|
+
// Compress
|
|
18
|
+
'*.png': ['yarn run compress --png'],
|
|
19
|
+
|
|
20
|
+
// Documentation
|
|
21
|
+
// Update the README whenever the documentation, or the README template
|
|
22
|
+
// changes
|
|
23
|
+
'docs/src/**/*.md': readmeCommands,
|
|
24
|
+
'.github/README.template.md': readmeCommands,
|
|
25
|
+
};
|
package/configs/node.cjs
CHANGED
package/configs/vite.js
CHANGED
|
@@ -3,8 +3,13 @@ const configDir = new URL('./vite/', import.meta.url).pathname;
|
|
|
3
3
|
|
|
4
4
|
export default defineConfig({
|
|
5
5
|
test: {
|
|
6
|
-
//
|
|
7
|
-
|
|
6
|
+
// vitest default is to run in watch mode, we revert that
|
|
7
|
+
watch: false,
|
|
8
|
+
// Allow a success, even if no files are passed
|
|
9
|
+
passWithNoTests: true,
|
|
10
|
+
// Hide skipped tests, allowing less noisy debug with fit/fdescribe
|
|
11
|
+
hideSkippedTests: true,
|
|
12
|
+
|
|
8
13
|
// Tests should be in a __tests__ folder next to their code
|
|
9
14
|
include: ['**/__tests__/**/*.js?(x)'],
|
|
10
15
|
// We ignore temporary folders from the tests
|
|
@@ -13,6 +18,8 @@ export default defineConfig({
|
|
|
13
18
|
// Restore mocks after each tests
|
|
14
19
|
restoreMocks: true,
|
|
15
20
|
|
|
21
|
+
// Make describe, it, beforeEach and other globally available
|
|
22
|
+
globals: true,
|
|
16
23
|
// Run before each test file
|
|
17
24
|
setupFiles: [
|
|
18
25
|
`${configDir}/test/setupFiles/dedent.js`,
|
package/main.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import minimist from 'minimist';
|
|
2
2
|
import consoleError from 'firost/consoleError.js';
|
|
3
3
|
import exit from 'firost/exit.js';
|
|
4
|
+
import env from 'firost/env.js';
|
|
5
|
+
import absolute from 'firost/absolute.js';
|
|
4
6
|
import _ from 'golgoth/lodash.js';
|
|
7
|
+
import path from 'path';
|
|
5
8
|
import commandCi from './commands/ci/index.js';
|
|
6
9
|
import commandCompress from './commands/compress/index.js';
|
|
7
10
|
import commandInit from './commands/init/index.js';
|
|
8
11
|
import commandPrecommit from './commands/precommit/index.js';
|
|
9
|
-
import commandRelease from './commands/release/index.js';
|
|
10
12
|
import commandTest from './commands/test/index.js';
|
|
11
13
|
import commandLint from './commands/lint/index.js';
|
|
12
14
|
import commandReadme from './commands/readme/index.js';
|
|
@@ -25,11 +27,34 @@ export default {
|
|
|
25
27
|
lint: commandLint,
|
|
26
28
|
precommit: commandPrecommit,
|
|
27
29
|
readme: commandReadme,
|
|
28
|
-
release: commandRelease,
|
|
29
30
|
setup: commandSetup,
|
|
30
31
|
test: commandTest,
|
|
31
32
|
};
|
|
32
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* Converts a list of filepaths to absolute filepaths
|
|
36
|
+
* Note: We want to be able to call commands like "aberlaas lint" from the
|
|
37
|
+
* workspace root or any child workspace. We also want to be able to use
|
|
38
|
+
* relative or absolute filepaths as arguments.
|
|
39
|
+
* INIT_CWD is always set to the directory where the command was called, but
|
|
40
|
+
* because scripts in child workspaces are actually calling scripts in the
|
|
41
|
+
* root workspace, that value is overwritten. This is why we save the original
|
|
42
|
+
* calling directory in ABERLAAS_CWD, and use that value if available.
|
|
43
|
+
* @param {Array} filepaths Array of filepaths
|
|
44
|
+
* @returns {Array} Array of absolute filepaths
|
|
45
|
+
**/
|
|
46
|
+
convertFilepathsToAbsolute(filepaths) {
|
|
47
|
+
const callingDirectory =
|
|
48
|
+
this.__env('ABERLAAS_CWD') || this.__env('INIT_CWD');
|
|
49
|
+
return _.map(filepaths, (inputFilepath) => {
|
|
50
|
+
const filepath =
|
|
51
|
+
inputFilepath[0] == '/'
|
|
52
|
+
? inputFilepath
|
|
53
|
+
: path.resolve(callingDirectory, inputFilepath);
|
|
54
|
+
|
|
55
|
+
return absolute(filepath);
|
|
56
|
+
});
|
|
57
|
+
},
|
|
33
58
|
/**
|
|
34
59
|
* Run the command specified on the command-line, along with specific
|
|
35
60
|
* arguments
|
|
@@ -51,6 +76,9 @@ export default {
|
|
|
51
76
|
// Remove the initial method from args passed to the command
|
|
52
77
|
args._ = _.drop(args._, 1);
|
|
53
78
|
|
|
79
|
+
// Make all filepaths absolute
|
|
80
|
+
args._ = this.convertFilepathsToAbsolute(args._);
|
|
81
|
+
|
|
54
82
|
try {
|
|
55
83
|
await command.run(args);
|
|
56
84
|
} catch (err) {
|
|
@@ -58,6 +86,7 @@ export default {
|
|
|
58
86
|
this.__exit(1);
|
|
59
87
|
}
|
|
60
88
|
},
|
|
89
|
+
__env: env,
|
|
61
90
|
__consoleError: consoleError,
|
|
62
91
|
__exit: exit,
|
|
63
92
|
};
|
package/package.json
CHANGED
|
@@ -2,22 +2,13 @@
|
|
|
2
2
|
"name": "aberlaas",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Scaffold your JavaScript projects with tests, lint and release scripts",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.4.0",
|
|
6
6
|
"repository": "pixelastic/aberlaas",
|
|
7
7
|
"homepage": "https://projects.pixelastic.com/aberlaas/",
|
|
8
8
|
"author": "Tim Carry (@pixelastic)",
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": "./main.js",
|
|
12
|
-
"./configs/lintstaged.cjs": "./configs/lintstaged.cjs",
|
|
13
|
-
"./configs/prettier.cjs": "./configs/prettier.cjs",
|
|
14
|
-
"./configs/styleling.cjs": "./configs/styleling.cjs"
|
|
15
|
-
},
|
|
16
10
|
"files": [
|
|
17
11
|
"bin/",
|
|
18
|
-
"lib/",
|
|
19
|
-
"scripts/",
|
|
20
|
-
"*.js",
|
|
21
12
|
"commands/ci/*.js",
|
|
22
13
|
"commands/compress/*.js",
|
|
23
14
|
"commands/init/*.js",
|
|
@@ -25,20 +16,28 @@
|
|
|
25
16
|
"commands/lint/helpers/*.js",
|
|
26
17
|
"commands/precommit/*.js",
|
|
27
18
|
"commands/readme/*.js",
|
|
28
|
-
"commands/release/*.js",
|
|
29
19
|
"commands/setup/*.js",
|
|
30
|
-
"commands/setup/autoRelease/*.js",
|
|
31
20
|
"commands/setup/helpers/*.js",
|
|
32
21
|
"commands/test/*.js",
|
|
33
22
|
"configs/",
|
|
34
|
-
"
|
|
23
|
+
"scripts/",
|
|
24
|
+
"templates/",
|
|
25
|
+
"*.js"
|
|
35
26
|
],
|
|
27
|
+
"exports": {
|
|
28
|
+
".": "./main.js",
|
|
29
|
+
"./configs/vite": "./configs/vite.js",
|
|
30
|
+
"./configs/lintstaged": "./configs/lintstaged.js",
|
|
31
|
+
"./configs/prettier": "./configs/prettier.js",
|
|
32
|
+
"./configs/stylelint": "./configs/stylelint.js"
|
|
33
|
+
},
|
|
34
|
+
"main": "./main.js",
|
|
36
35
|
"bin": "bin/aberlaas.js",
|
|
37
36
|
"dependencies": {
|
|
38
37
|
"@octokit/rest": "18.12.0",
|
|
39
38
|
"ci-info": "3.9.0",
|
|
40
39
|
"dedent": "1.5.1",
|
|
41
|
-
"eslint": "8.
|
|
40
|
+
"eslint": "8.56.0",
|
|
42
41
|
"eslint-config-prettier": "9.0.0",
|
|
43
42
|
"eslint-plugin-import": "2.29.0",
|
|
44
43
|
"eslint-plugin-jsdoc": "46.9.0",
|
|
@@ -66,15 +65,17 @@
|
|
|
66
65
|
"node": ">=18"
|
|
67
66
|
},
|
|
68
67
|
"scripts": {
|
|
69
|
-
"build": "
|
|
70
|
-
"build:prod": "
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"release": "
|
|
74
|
-
"
|
|
75
|
-
"test": "
|
|
76
|
-
"
|
|
68
|
+
"build": "ABERLAAS_CWD=$INIT_CWD yarn g:build",
|
|
69
|
+
"build:prod": "ABERLAAS_CWD=$INIT_CWD yarn g:build:prod",
|
|
70
|
+
"cms": "ABERLAAS_CWD=$INIT_CWD yarn g:cms",
|
|
71
|
+
"serve": "ABERLAAS_CWD=$INIT_CWD yarn g:serve",
|
|
72
|
+
"release": "ABERLAAS_CWD=$INIT_CWD yarn g:release",
|
|
73
|
+
"test": "ABERLAAS_CWD=$INIT_CWD yarn g:test",
|
|
74
|
+
"test:watch": "ABERLAAS_CWD=$INIT_CWD yarn g:test:watch",
|
|
75
|
+
"compress": "ABERLAAS_CWD=$INIT_CWD yarn g:compress",
|
|
76
|
+
"lint": "ABERLAAS_CWD=$INIT_CWD yarn g:lint",
|
|
77
|
+
"lint:fix": "ABERLAAS_CWD=$INIT_CWD yarn g:lint:fix",
|
|
77
78
|
"postinstall": "./scripts/postinstall"
|
|
78
79
|
},
|
|
79
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "fc4d64e02a654a347026a5c00b9dbb0fa3c92be2"
|
|
80
81
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Hidden files
|
|
1
|
+
# Hidden files are ignored by default by ESLint
|
|
2
2
|
# The following line will unignore them
|
|
3
3
|
!.*
|
|
4
4
|
|
|
@@ -7,3 +7,6 @@ node_modules/
|
|
|
7
7
|
|
|
8
8
|
# .yarn contains the yarn source code, we don't need to lint it
|
|
9
9
|
.yarn/
|
|
10
|
+
|
|
11
|
+
# Ignore the documentation for now, I haven't migrated it to ESM yet
|
|
12
|
+
docs/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Hidden files
|
|
2
|
+
.DS_Store
|
|
3
|
+
.envrc
|
|
4
|
+
|
|
5
|
+
# Directories
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
node_modules/
|
|
9
|
+
tmp/
|
|
10
|
+
|
|
11
|
+
# Files
|
|
12
|
+
Thumbs.db
|
|
13
|
+
lerna-debug.log
|
|
14
|
+
npm-debug.log
|
|
15
|
+
yarn-error.log
|
|
16
|
+
*~
|
|
17
|
+
|
|
18
|
+
# Yarn
|
|
19
|
+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
|
20
|
+
.yarn/*
|
|
21
|
+
!.yarn/patches
|
|
22
|
+
!.yarn/plugins
|
|
23
|
+
!.yarn/releases
|
|
24
|
+
!.yarn/sdks
|
|
25
|
+
!.yarn/versions
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# Netlify
|
|
29
|
+
.netlify
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import current from '../main.js';
|
|
2
2
|
|
|
3
|
-
describe('
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
describe('main', () => {
|
|
4
|
+
describe('run', () => {
|
|
5
|
+
it('should pass', async () => {
|
|
6
|
+
const input = 'something';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
const actual = current.run(input);
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
expect(actual).toBe('something');
|
|
11
|
+
});
|
|
10
12
|
});
|
|
11
13
|
});
|
package/templates/lib/main.js
CHANGED
package/templates/scripts/ci
CHANGED
package/templates/scripts/lint
CHANGED