Skip to content
This repository was archived by the owner on Jul 28, 2021. It is now read-only.

Commit 8714577

Browse files
authored
Merge branch 'latest' into larsgw/tink-view-2
2 parents 744c97e + 948c492 commit 8714577

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1885
-1024
lines changed

CHANGELOG.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,152 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
<a name="0.19.9"></a>
6+
## [0.19.9](https://github.com/npm/tink/compare/v0.19.8...v0.19.9) (2019-01-03)
7+
8+
9+
### Bug Fixes
10+
11+
* **esm:** more esm fixes ([7066705](https://github.com/npm/tink/commit/7066705))
12+
13+
14+
15+
<a name="0.19.8"></a>
16+
## [0.19.8](https://github.com/npm/tink/compare/v0.19.7...v0.19.8) (2019-01-03)
17+
18+
19+
### Bug Fixes
20+
21+
* **esm:** downgrade esm for now ([ad26a10](https://github.com/npm/tink/commit/ad26a10))
22+
23+
24+
25+
<a name="0.19.7"></a>
26+
## [0.19.7](https://github.com/npm/tink/compare/v0.19.6...v0.19.7) (2019-01-03)
27+
28+
29+
### Bug Fixes
30+
31+
* **esm:** try the non-bundled esm ([5f7abf3](https://github.com/npm/tink/commit/5f7abf3))
32+
33+
34+
35+
<a name="0.19.6"></a>
36+
## [0.19.6](https://github.com/npm/tink/compare/v0.19.5...v0.19.6) (2019-01-03)
37+
38+
39+
### Bug Fixes
40+
41+
* **fs:** try to hunt down cachePath issue ([d5745b8](https://github.com/npm/tink/commit/d5745b8))
42+
43+
44+
45+
<a name="0.19.5"></a>
46+
## [0.19.5](https://github.com/npm/tink/compare/v0.19.4...v0.19.5) (2019-01-03)
47+
48+
49+
### Bug Fixes
50+
51+
* **fs:** require fs before esm ([6efc3fe](https://github.com/npm/tink/commit/6efc3fe))
52+
53+
54+
55+
<a name="0.19.4"></a>
56+
## [0.19.4](https://github.com/npm/tink/compare/v0.19.3...v0.19.4) (2019-01-03)
57+
58+
59+
### Bug Fixes
60+
61+
* **deps:** remove unused or redundant deps and update babel deps ([aeee9a3](https://github.com/npm/tink/commit/aeee9a3))
62+
63+
64+
65+
<a name="0.19.3"></a>
66+
## [0.19.3](https://github.com/npm/tink/compare/v0.19.2...v0.19.3) (2019-01-02)
67+
68+
69+
70+
<a name="0.19.2"></a>
71+
## [0.19.2](https://github.com/npm/tink/compare/v0.19.1...v0.19.2) (2019-01-02)
72+
73+
74+
### Bug Fixes
75+
76+
* **babel:** switch to esm from repo and fix babel usage ([a6daeb1](https://github.com/npm/tink/commit/a6daeb1))
77+
* **jsx,ts:** use babel for transforming ([16d03a8](https://github.com/npm/tink/commit/16d03a8))
78+
* **shell:** stop throwing away errors ([1b507e8](https://github.com/npm/tink/commit/1b507e8))
79+
80+
81+
82+
<a name="0.19.1"></a>
83+
## [0.19.1](https://github.com/npm/tink/compare/v0.19.0...v0.19.1) (2019-01-02)
84+
85+
86+
### Performance Improvements
87+
88+
* **sh:** load main module in-process when possible ([5e9e352](https://github.com/npm/tink/commit/5e9e352))
89+
90+
91+
92+
<a name="0.19.0"></a>
93+
# [0.19.0](https://github.com/npm/tink/compare/v0.18.0...v0.19.0) (2019-01-01)
94+
95+
96+
### Features
97+
98+
* **esm:** adding baseline ESM load support ([d58d636](https://github.com/npm/tink/commit/d58d636))
99+
100+
101+
102+
<a name="0.18.0"></a>
103+
# [0.18.0](https://github.com/npm/tink/compare/v0.17.3...v0.18.0) (2018-12-19)
104+
105+
106+
### Bug Fixes
107+
108+
* **sh:** make sure to load fs patches too ([0117dbe](https://github.com/npm/tink/commit/0117dbe))
109+
110+
111+
### Features
112+
113+
* **prepare:** support install scripts and native builds ([11fc0d6](https://github.com/npm/tink/commit/11fc0d6))
114+
115+
116+
117+
<a name="0.17.3"></a>
118+
## [0.17.3](https://github.com/npm/tink/compare/v0.17.2...v0.17.3) (2018-12-03)
119+
120+
121+
### Bug Fixes
122+
123+
* **add:** ugh ([1cc5ad0](https://github.com/npm/tink/commit/1cc5ad0))
124+
* **fs:** make open override do a two-step copy for now ([2e3780f](https://github.com/npm/tink/commit/2e3780f))
125+
* **installer:** load node patches earlier ([6f28969](https://github.com/npm/tink/commit/6f28969))
126+
* **pkglock:** fix arguments to prepare in lock worker ([65b657c](https://github.com/npm/tink/commit/65b657c))
127+
* **shell:** use argv._ now ([68e301d](https://github.com/npm/tink/commit/68e301d))
128+
129+
130+
131+
<a name="0.17.2"></a>
132+
## [0.17.2](https://github.com/npm/tink/compare/v0.17.1...v0.17.2) (2018-12-01)
133+
134+
135+
### Bug Fixes
136+
137+
* **access:** fix config/log stuff ([109a5fe](https://github.com/npm/tink/commit/109a5fe))
138+
* **add:** fix up config stuff ([10ad858](https://github.com/npm/tink/commit/10ad858))
139+
* **build:** fix up config stuff ([11dec66](https://github.com/npm/tink/commit/11dec66))
140+
* **config:** already giving it a log object. ([52fb92c](https://github.com/npm/tink/commit/52fb92c))
141+
* **deprecate:** fix up config stuff ([fcfd40d](https://github.com/npm/tink/commit/fcfd40d))
142+
* **org:** fix up config stuff ([c56d336](https://github.com/npm/tink/commit/c56d336))
143+
* **ping:** improve the overall command a bit ([9b18a86](https://github.com/npm/tink/commit/9b18a86))
144+
* **profile:** fix up config stuff ([43f8356](https://github.com/npm/tink/commit/43f8356))
145+
* **rm:** fix up config stuff ([69312aa](https://github.com/npm/tink/commit/69312aa))
146+
* **team:** fix up config stuff ([9917fe5](https://github.com/npm/tink/commit/9917fe5))
147+
* **whoami:** fix up config stuff ([adb31e4](https://github.com/npm/tink/commit/adb31e4))
148+
149+
150+
5151
<a name="0.17.1"></a>
6152
## [0.17.1](https://github.com/npm/tink/compare/v0.17.0...v0.17.1) (2018-11-26)
7153

bin/tink.js

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,65 @@
11
#!/usr/bin/env node
22

3-
require('../lib/node/index.js')
3+
require('../lib/node/extensions.js').overrideNode()
4+
const reqmain = require.main
5+
require = require('esm')(module, { //eslint-disable-line
6+
force: true,
7+
cjs: {
8+
interop: true,
9+
namedExports: true,
10+
extensions: true,
11+
vars: true
12+
}
13+
})
14+
15+
const CMDS = new Set([
16+
'access',
17+
'add',
18+
'build',
19+
'deprecate',
20+
'org',
21+
'ping',
22+
'prepare',
23+
'profile',
24+
'rm',
25+
'shell',
26+
'team',
27+
'view',
28+
'whoami'
29+
])
430

5-
const CMDS = new Map([
6-
['access', require('../lib/commands/access.jsx')],
7-
['add', require('../lib/commands/add.js')],
8-
['build', require('../lib/commands/build.js')],
9-
['deprecate', require('../lib/commands/deprecate.js')],
10-
['org', require('../lib/commands/org.jsx')],
11-
['ping', require('../lib/commands/ping.js')],
12-
['prepare', require('../lib/commands/prepare.js')],
13-
['profile', require('../lib/commands/profile.jsx')],
14-
['rm', require('../lib/commands/rm.js')],
15-
['shell', require('../lib/commands/shell.js')],
16-
['team', require('../lib/commands/team.js')],
17-
['view', require('../lib/commands/view.js')],
18-
['whoami', require('../lib/commands/whoami.js')]
31+
const ALIASES = new Map([
32+
['prep', 'prepare'],
33+
['sh', 'shell']
1934
])
2035

21-
if (require.main === module) {
36+
if (reqmain === module) {
2237
main(process.argv)
2338
}
2439

2540
module.exports = main
2641
function main (argv) {
2742
const log = require('npmlog')
2843
log.heading = 'tink'
29-
const npmConfig = require('../lib/config.js')
30-
return runCommandWithYargs(argv, log, npmConfig)
44+
return runCommandWithYargs(argv, log)
3145
}
3246

33-
function runCommandWithYargs (argv, log, npmConfig) {
34-
// This code path costs ~200ms on startup.
47+
function runCommandWithYargs (argv, log) {
3548
let config = require('yargs')
3649
.demandCommand(1, 'Subcommand is required')
3750
.recommendCommands()
3851
.help()
3952
.alias('help', 'h')
4053
.alias('version', 'v')
4154
.completion()
42-
for (const mod of CMDS.values()) {
43-
config = config.command(mod)
55+
if (ALIASES.has(argv[2])) {
56+
config = config.command(require(`../lib/yargs-modules/${ALIASES.get(argv[2])}.js`))
57+
} else if (CMDS.has(argv[2])) {
58+
config = config.command(require(`../lib/yargs-modules/${argv[2]}.js`))
59+
} else {
60+
for (const mod of CMDS.values()) {
61+
config = config.command(require(`../lib/yargs-modules/${mod}.js`))
62+
}
4463
}
45-
require('../lib/node/index.js')
4664
config = config.argv
4765
}

0 commit comments

Comments
 (0)